This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45742] VOLATILE has no effect
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Nov 2010 21:59:45 +0000
- Subject: [Bug fortran/45742] VOLATILE has no effect
- Auto-submitted: auto-generated
- References: <bug-45742-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45742
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2010-11-12 21:56:08 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > Apparently, VOLATILE has no effect at all. Another test case:
> [...]
> > Tobias, any ideas?
>
> No idea:
>
> $ cat test.f90.003t.original
> ...
> integer(kind=4) b;
> volatile integer(kind=4) j;
>
> b = ((j + j) + j) + j;
I see:
foo (integer(kind=4) & restrict j)
{
integer(kind=4) b;
b = ((*j + *j) + *j) + *j;
{
struct __st_parameter_dt dt_parm.0;
so the volatile is missing. Huh?
This may be a Heisenbug. Unfortunately, valgrind doesn't work on
my system.