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 middle-end/23584] New: ipa-pure-const pass ignores dereferencing a volatile pointer type


A function that dereferences an absolute address in memory, e.g.:

  int test (void)
  {
    return * (volatile int *) 0x1234;
  }

Is incorrectly identified by the ipa-pure-const pass as being pure, resulting in invalid optimizations 
being performed.

This can be seen in the ipa-pure-const dump file:

  Function found to be pure: test

-- 
           Summary: ipa-pure-const pass ignores dereferencing a volatile
                    pointer type
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jconner at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: all


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


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