[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-26 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2009-02-27 00:00 --- The fortran front-end needs to be able to tell the middle-end that the function cannot be recursive and then the middle-end needs to use that info. -- pinskia at gcc dot gnu dot org changed: What|

[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread pinskia at gmail dot com
--- Comment #6 from pinskia at gmail dot com 2009-02-25 13:37 --- Subject: Re: Optimize away only set but not used variable Sent from my iPhone On Feb 25, 2009, at 1:43 AM, "rguenth at gcc dot gnu dot org" wrote: > > > --- Comment #1 from rguenth at gcc dot gnu dot org 2009-0

Re: [Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread Andrew Thomas Pinski
Sent from my iPhone On Feb 25, 2009, at 1:43 AM, "rguenth at gcc dot gnu dot org" > wrote: --- Comment #1 from rguenth at gcc dot gnu dot org 2009-02-25 09:43 --- Is there a reason the Fortran frontend gives function local variables static storage duration? Yes, it is larg

[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread rguenth at gcc dot gnu dot org
--- Comment #5 from rguenth at gcc dot gnu dot org 2009-02-25 11:21 --- Optimizing dead local static variables requires special handling which probably is not thought to be worth the trouble. If the variable is unused the programmer can as well remove it. -- http://gcc.gnu.org/bugz

[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread burnus at gcc dot gnu dot org
--- Comment #4 from burnus at gcc dot gnu dot org 2009-02-25 10:35 --- I did some testing with sunf95, icc and ifort. sunf95 also puts the variable in .bss as gfortran does, while ifort puts it on the stack (unless explicitly declared as static ["SAVE"]). If the variable is static, neit

[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread burnus at gcc dot gnu dot org
--- Comment #3 from burnus at gcc dot gnu dot org 2009-02-25 10:21 --- > Is there a reason the Fortran frontend gives function local variables static > storage duration? For huge arrays, there is a problem if the memory is allocated on the stack, as one quickly hits stack-size limits. T

[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2009-02-25 09:51 --- It works with it == 1024 in which case foo is not static. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39298

[Bug middle-end/39298] Optimize away only set but not used variable

2009-02-25 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2009-02-25 09:43 --- Is there a reason the Fortran frontend gives function local variables static storage duration? a () { struct __st_parameter_dt dt_parm.1; static integer(kind=4) options.0[8] = {68, 255, 0, 0, 0, 1, 0, 1}; stat