This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22441] New: ICE on redefined inline function
- From: "jakub at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2005 13:35:48 -0000
- Subject: [Bug c/22441] New: ICE on redefined inline function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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