-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: fazedo at gmail dot com
Target Milestone: ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96336
--- Comment #1 from Fabio Azevedo ---
int f(int x) {
return x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x; //x**16
}
int g(int x) {
return x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x + x*x; //x**16 + x**2
}
Using gcc -O3, the first function simplifies to 4 intege
: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: fazedo at gmail dot com
Target Milestone: ---
Hello,
The following code produces 1/0 = 0 with gcc -O2:
#include
#include
int main(int argn, char** argc){
unsigned base = argn>1 ? atoi(arg