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 fortran/35037] VOLATILE attribute not being honored with common block variable



------- Comment #4 from burnus at gcc dot gnu dot org  2008-02-04 20:58 -------
> But I'm useless at reading assembly (the tree dump doesn't have these
> attributes written out)

Try something like the following with -O3 -fdump-tree-optimized:

      subroutine wait4it ()
        logical event
        volatile event
!        common /dd/ event
        event = .false.
        do
          if (event) print *, 'gfhzjf'
        end do
      end subroutine

I did not test your patch, but without the common line, the dump contains
"gfhzjf" until you remove the volatile. This saves you from reading assembler.


-- 


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


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