User account creation filtered due to spam.

Bug 14924 - Compiler ICE on valid code
Summary: Compiler ICE on valid code
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.1
Assignee: Aldy Hernandez
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-04-12 15:56 UTC by edmar
Modified: 2004-05-30 15:13 UTC (History)
1 user (show)

See Also:
Host: powerpc-unknown-linux-gnu
Target: powerpc-unknown-linux-gnuspe
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-05-12 23:19:56


Attachments
This is the .i file for the small test case submited (1.26 KB, application/octet-stream)
2004-04-12 16:00 UTC, edmar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description edmar 2004-04-12 15:56:43 UTC
There is a problem with NE rtl handling for powerpc e500 target on the latest
3.4 pre-release.
This little program, seg faults the compiler:
#include <spe.h>

__ev64_u16__ * g_vp_u16 ;
__ev64_u16__ g_v_u16 ;

void
test___ev_stdd (void)
{
  __ev_stdd (g_v_u16,g_vp_u16,31U);
}

Command line was:
gcc-3.4-20040406/bin/gcc -O1 -S x.c -save-temps

Here is the output:
x.c: In function `test___ev_stdd':
x.c:9: internal compiler error: in copy_to_mode_reg, at explow.c:667
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Several benchmarks in spec2k have problems. Perlbmk also ICE:
op.c: In function `list_assignment':
op.c:2552: error: unrecognizable insn:
(insn:HI 257 256 258 18 (set (reg:CCEQ 212)
       (compare:CCEQ (gtu:SI (reg:CCUNS 211)
               (const_int 0 [0x0]))
           (const_int 0 [0x0]))) -1 (nil)
   (expr_list:REG_DEAD (reg:CCUNS 211)
       (nil)))
op.c:2552: internal compiler error: in extract_insn, at recog.c:2083
Comment 1 edmar 2004-04-12 16:00:16 UTC
Created attachment 6077 [details]
This is the .i file for the small test case submited

This is the .i file for the small test case submited
Comment 2 edmar 2004-04-12 16:03:49 UTC
Here is the outut of -v (config info)
-------------------------------------

Reading specs from
/root/edmar/gcc-3.4-20040406/lib/gcc/powerpc-unknown-linux-gnuspe/3.4.0/specs
Configured with: ../src/gcc_sources/configure
--prefix=/root/edmar/gcc-3.4-20040406 --target=powerpc-unknown-linux-gnuspe
--host=powerpc-unknown-linux-gnuspe --enable-languages=c,c++ --disable-gdbtk
--without-x
Thread model: posix
gcc version 3.4.0 20040407 (prerelease)
 /root/edmar/gcc-3.4-20040406/libexec/gcc/powerpc-unknown-linux-gnuspe/3.4.0/cc1
-E -quiet -v -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux
-D__linux -Asystem=linux -Asystem=unix -Asystem=posix x.c -O1 -o x.i
ignoring nonexistent directory
"/root/edmar/gcc-3.4-20040406/lib/gcc/powerpc-unknown-linux-gnuspe/3.4.0/../../../../powerpc-unknown-linux-gnuspe/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /root/edmar/gcc-3.4-20040406/include
 /root/edmar/gcc-3.4-20040406/lib/gcc/powerpc-unknown-linux-gnuspe/3.4.0/include
 /usr/include
End of search list.
 /root/edmar/gcc-3.4-20040406/libexec/gcc/powerpc-unknown-linux-gnuspe/3.4.0/cc1
-fpreprocessed x.i -quiet -dumpbase x.c -auxbase x -O1 -version -o x.s
GNU C version 3.4.0 20040407 (prerelease) (powerpc-unknown-linux-gnuspe)
	compiled by GNU C version 2.95.4 20010319 (prerelease/franzo/20011204).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64501
x.c: In function `test___ev_stdd':
x.c:9: internal compiler error: in copy_to_mode_reg, at explow.c:667
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 3 Dara Hazeghi 2004-05-12 23:19:56 UTC
typedef unsigned short __attribute__((vector_size(8))) __ev64_u16__;
Confirmed with current tree-ssa. Reduced snippet is:

__ev64_u16__ * g_vp_u16 ;
__ev64_u16__ g_v_u16 ;

void
test___ev_stdd (void)
{
  __builtin_spe_evstdd (g_v_u16,g_vp_u16,31U);
}
Comment 4 Aldy Hernandez 2004-05-26 23:56:39 UTC
Fixed.

http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01701.html