This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13665] New: Compiler gets internal error on valid code
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2004 02:04:51 -0000
- Subject: [Bug c/13665] New: Compiler gets internal error on valid code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiler main pass gets internal compiler error on supplied test case, which is
stripped down from real code in the winsup sources.
Environment:
System: Linux fred.ninemoons.com 2.4.22-1.2140.nptl #1 Tue Jan 6 20:20:25 EST 2004 i686 athlon i386 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-mingw32
configured with: /src/sourceware/gcc/gcc/configure -v --target=i686-pc-mingw32 --prefix=/usr/local/sourceware --enable-languages=c,c++
How-To-Repeat:
$ cat /tmp/bug6.i
typedef long long long long;
typedef unsigned long long uintmax_t;
int* __attribute__((__cdecl__)) _errno(void);
long long
strtoimax (nptr, endptr, base)
register const char * __restrict__ nptr;
char ** __restrict__ endptr;
register int base;
{
register unsigned long long accum;
register int n;
int toobig;
for ( toobig = 0; n = (isdigit(*nptr) ? (*nptr) - '0' : isupper(*nptr) ? (*nptr) - 'A' + 10 : islower(*nptr) ? (*nptr) - 'a' + 10 : -1 ), ((n) >= 0 && (n) < (base)); ++nptr )
if ( accum > (unsigned long long)(9223372036854775807LL / base + 2) )
toobig = 1;
else
accum = base * accum + n;
if ( endptr != ((void *)0) )
*endptr = (char *)nptr;
}
$ ./cc1 -O2 /tmp/bug6.i
/tmp/bug6.i:1: warning: useless keyword or type name in empty declaration
/tmp/bug6.i:1: warning: empty declaration
strtoimax
Analyzing compilation unit
Performing intraprocedural optimizations
Assembling functions:
strtoimax
/tmp/bug6.i: In function `strtoimax':
/tmp/bug6.i:22: internal compiler error: virtual array alias sets[6]: element 4294967294 out of bounds in get_alias_set_entry, at alias.c:217
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: Compiler gets internal error on valid code
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fnf at ninemoons dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13665