This is the mail archive of the gcc-prs@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]

c++/380: gcc 2.91.66 crashes on certain 32bit -> 64bit conversions



>Number:         380
>Category:       c++
>Synopsis:       gcc 2.91.66 crashes on certain 32bit -> 64bit conversions
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 05 17:16:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Allen Martin
>Release:        gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
>Organization:
>Environment:
#uname -a
Linux skunk.3dfx.com 2.2.13ac2 #1 SMP Mon Nov 8 08:26:19 PST 1999 i686 unknown
>Description:
gcc reports an internal compiler error when doing 32bit to
64bit conversions under certain circumstances.  This only 
occurs when optimization is turned on "-O2".  I've narrowed
the code down to what I think is the smallest subset that 
still exhibits the behavior.
>How-To-Repeat:
skunk: /home/arm/gccbug>g++ -v --save-temps -O2 foo.c -o foo
Reading specs from /home/arm/trees/TOOLROOT/Linux/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /home/arm/trees/TOOLROOT/Linux/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/cpp -lang-c++ -v -iprefix /home/arm/trees/TOOLROOT/Linux/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/ -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ foo.c foo.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /home/arm/trees/TOOLROOT/Linux/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/include
 /usr/local/include
 /usr/include
End of search list.
 /home/arm/trees/TOOLROOT/Linux/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/cc1plus foo.ii -quiet -dumpbase foo.cc -O2 -version -o foo.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
foo.c: In function `int main()':
foo.c:9: Internal compiler error.
foo.c:9: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
foo.c:9: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.



following program compiled with "g++ -O2 foo.c -o foo"

int main(void)
{
  enum { a }; 
  int i;
  long long ll[2];
  
  ll[0] = i & 1;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

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