[Bug c/22441] New: ICE on redefined inline function
jakub at redhat dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 12 13:40:00 GMT 2005
static inline __attribute__ ((always_inline))
int baz (const unsigned char *addr)
{
return addr[0] & 0x01;
}
static inline __attribute__ ((always_inline))
int bar (const unsigned char *addr)
{
return !baz (addr);
}
extern inline __attribute__ ((always_inline))
int baz (const unsigned char *addr)
{
return addr[0] != 0xff && (0x01 & addr[0]);
}
int
foo (unsigned char *p)
{
return bar (p);
}
ICEs at -O2 -fno-unit-at-a-time and issues a sorry message with -O2.
Both GCC 3.4.4 and HEAD reject this as invalid.
--
Summary: ICE on redefined inline function
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22441
More information about the Gcc-bugs
mailing list