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 tree-optimization/20168] New: [4.0 regression] const function calls treated as pure by LIM 20100 fix


Before the fix for PR 20100 and PR 20115, const and pure calls were both treated
as "const".  After the fix, both are treated as "pure" by that fix, but
a .GLOBAL_VAR is unnecessarily created because of the bambam call in:

extern int constfun (void) __attribute__ ((__const__));
extern void bambam (void);

int x (void)
{
  int a = constfun ();
  bambam ();
  return a + constfun ();
}

-- 
           Summary: [4.0 regression] const function calls treated as pure by
                    LIM 20100 fix
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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