[Bug fortran/45742] VOLATILE has no effect
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 12 20:55:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45742
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-11-12 20:33:36 UTC ---
I think the first test case is wrongly folded already by the front end:
program main
integer, volatile :: j
if (j>j) call notfound
end program main
Gives the original dump:
MAIN__ ()
{
volatile integer(kind=4) j;
L.1:;
}
* * *
For some reason, also:
program main
integer, volatile :: j, k
if (j>k) call notfound
end program main
does not give a link error. The optimized dump has:
j.1_8 ={v} j;
k.2_9 ={v} k;
if (j.1_8 > k.2_9)
goto <bb 3>;
<bb 3>:
notfound ();
which looks OK, but there is no link error?!?
More information about the Gcc-bugs
mailing list