This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/20168] New: [4.0 regression] const function calls treated as pure by LIM 20100 fix
- From: "hp at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2005 15:20:18 -0000
- Subject: [Bug tree-optimization/20168] New: [4.0 regression] const function calls treated as pure by LIM 20100 fix
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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