This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30032] sqrt(CGAMMA*PRES[j]/DENS[j]) much slower than compiting compiler



------- Comment #5 from pinskia at physics dot uc dot edu  2006-11-30 21:23 -------
Subject: Re:  sqrt(CGAMMA*PRES[j]/DENS[j]) much slower than compiting compiler

> 
> 
> 
> ------- Comment #4 from burnus at gcc dot gnu dot org  2006-11-30 21:14 -------
> > Also you are using VLAs so maybe ICC also converts those VLAs to normal 
> > arrays.

You misunderstood me.
const int NODES = 2500;
float f[NODES];

causes a VLA to happen because in C, NODES is not a constant expression.
You can do instead:
#define NODES 2500
to get the non VLA.

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30032


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]