public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36466]  New: internal compiler error: in choose_reload_regs, at reload1.c:6190
@ 2008-06-08 14:31 aurelien at aurel32 dot net
  2008-06-08 14:32 ` [Bug target/36466] " aurelien at aurel32 dot net
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: aurelien at aurel32 dot net @ 2008-06-08 14:31 UTC (permalink / raw)
  To: gcc-bugs

gcc fails to build the attached testcase with optimization levels above -O0.
The problem occurs with all versions from the gcc 4.x branch. Versions gcc 3.x
do not expose the problem. Note that the ICE occurs on both old-ABI and EABI.

Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.0-5'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions
--enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi
--target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.1 20080523 (prerelease) (Debian 4.3.0-5)


-- 
           Summary: internal compiler error: in choose_reload_regs, at
                    reload1.c:6190
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aurelien at aurel32 dot net
 GCC build triplet: arm-linux-gnueabi
  GCC host triplet: arm-linux-gnueabi
GCC target triplet: arm-linux-gnueabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
@ 2008-06-08 14:32 ` aurelien at aurel32 dot net
  2009-01-02 11:52 ` laurent at guerby dot net
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: aurelien at aurel32 dot net @ 2008-06-08 14:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from aurelien at aurel32 dot net  2008-06-08 14:31 -------
Created an attachment (id=15731)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15731&action=view)
reduced testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
  2008-06-08 14:32 ` [Bug target/36466] " aurelien at aurel32 dot net
@ 2009-01-02 11:52 ` laurent at guerby dot net
  2009-01-02 11:55 ` laurent at guerby dot net
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: laurent at guerby dot net @ 2009-01-02 11:52 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]



------- Comment #2 from laurent at guerby dot net  2009-01-02 11:50 -------
Confirmed with gcc-4.3.2-1 Debian gnueabi:
$ gcc -c -O1 pr36466.c
pr36466.c: In function ‘ReadCfgFile’:
pr36466.c:19: internal compiler error: in choose_reload_regs, at reload1.c:6190

And on trunk rev 142984:
pr36466.c: In function 'ReadCfgFile':
pr36466.c:19: internal compiler error: in choose_reload_regs, at reload1.c:6470


-- 

laurent at guerby dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pbrook at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.3.2
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-02 11:50:37
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
  2008-06-08 14:32 ` [Bug target/36466] " aurelien at aurel32 dot net
  2009-01-02 11:52 ` laurent at guerby dot net
@ 2009-01-02 11:55 ` laurent at guerby dot net
  2009-08-04  6:52 ` nospamnoham at gmail dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: laurent at guerby dot net @ 2009-01-02 11:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from laurent at guerby dot net  2009-01-02 11:53 -------
backtrace on trunk:

(gdb) bt
#0  fancy_abort (file=0x786084 "../../trunk/gcc/reload1.c", line=6470,
function=0x785f8c "choose_reload_regs") at ../../trunk/gcc/diagnostic.c:712
#1  0x002ba378 in choose_reload_regs (chain=<value optimized out>) at
../../trunk/gcc/reload1.c:6470
#2  0x002baf08 in reload_as_needed (live_known=<value optimized out>) at
../../trunk/gcc/reload1.c:4240
#3  0x002bf868 in reload (first=<value optimized out>, global=<value optimized
out>) at ../../trunk/gcc/reload1.c:1169
#4  0x0068815c in rest_of_handle_ira () at ../../trunk/gcc/ira.c:2018
#5  0x0026ebc8 in execute_one_pass (pass=0x91fa54) at
../../trunk/gcc/passes.c:1279
#6  0x0026ee34 in execute_pass_list (pass=0x91fa54) at
../../trunk/gcc/passes.c:1328
#7  0x0026ee4c in execute_pass_list (pass=0x91a390) at
../../trunk/gcc/passes.c:1329
#8  0x003726f4 in tree_rest_of_compilation (fndecl=0x40232780) at
../../trunk/gcc/tree-optimize.c:419
#9  0x004e92d4 in cgraph_expand_function (node=0x401b0900) at
../../trunk/gcc/cgraphunit.c:1047
#10 0x004eb35c in cgraph_optimize () at ../../trunk/gcc/cgraphunit.c:1106
#11 0x0001cabc in c_write_global_declarations () at
../../trunk/gcc/c-decl.c:8074
#12 0x0031e58c in toplev_main (argc=<value optimized out>, argv=<value
optimized out>) at ../../trunk/gcc/toplev.c:981
#13 0x40095dfc in __libc_start_main () from /lib/libc.so.6
#14 0x0000aa7c in _start ()


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (2 preceding siblings ...)
  2009-01-02 11:55 ` laurent at guerby dot net
@ 2009-08-04  6:52 ` nospamnoham at gmail dot com
  2009-08-04 13:59 ` mikpe at it dot uu dot se
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: nospamnoham at gmail dot com @ 2009-08-04  6:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from nospamnoham at gmail dot com  2009-08-04 06:52 -------
I see the same problem when I try to compile transmission release 1.73. The
error happens with file libtransmission/fdlimit.c. Works till -O1 but fails
with -O2 or -O3. Seeing this error with gcc 4.21.

Transmission was configured with:
./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi \
                        --build=i686-pc-linux \
                        --disable-gtk --disable-nls \
                        --prefix=/usr/local \
                       
CFLAGS="-I/home/user/proj/syno-packager/precomp/88f6281/arm-none-linux-gnueabi/include
-I/home/user/proj/syno-packager/out/88f6281/temproot/usr/local/include
-I/home/user/proj/syno-packager/out/88f6281/root/usr/local/include"
LDFLAGS="-L/home/user/proj/syno-packager/precomp/88f6281/arm-none-linux-gnueabi/lib
-L/home/user/proj/syno-packager/out/88f6281/temproot/usr/local/lib
-L/home/user/proj/syno-packager/out/88f6281/root/usr/local/lib"

Transmission needs openssl and curl to compile. So if you want to reproduce
this issue, you might have to compile them first.

Please email me if you need further data.

Thanks,
SK


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (3 preceding siblings ...)
  2009-08-04  6:52 ` nospamnoham at gmail dot com
@ 2009-08-04 13:59 ` mikpe at it dot uu dot se
  2009-08-04 14:07 ` mikpe at it dot uu dot se
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: mikpe at it dot uu dot se @ 2009-08-04 13:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mikpe at it dot uu dot se  2009-08-04 13:58 -------
Confirmed with gcc-4.3-20090802, gcc-4.4-20090728, and gcc-4.5-20090730.
Passing -mtune=xscale to gcc prevents the ICE.


-- 

mikpe at it dot uu dot se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (4 preceding siblings ...)
  2009-08-04 13:59 ` mikpe at it dot uu dot se
@ 2009-08-04 14:07 ` mikpe at it dot uu dot se
  2009-08-05 16:42 ` ramana at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: mikpe at it dot uu dot se @ 2009-08-04 14:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mikpe at it dot uu dot se  2009-08-04 14:07 -------
Hang on, the test case looks invalid:

> ReadCfgFile (char *cfg_file)
> {
>   void *conf_handler;
>   int i;
>   struct sockaddr_in nsaddr_list[0];
>   char *nserver_str;
>   qp_getconf_array_str (conf_handler, "Nameservers", i, &nserver_str, 0);
>   (*__res_state ()).nsaddr_list[(*__res_state ()).nscount++] = nsaddr_list[0];
> }

This has a zero-element array as a local variable, which it then fetches an
element from. That's clearly invalid. Changing it as follows

-  struct sockaddr_in nsaddr_list[0];
+  struct sockaddr_in nsaddr_list[1];

makes the test case work for me, even without -mtune=xscale.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (5 preceding siblings ...)
  2009-08-04 14:07 ` mikpe at it dot uu dot se
@ 2009-08-05 16:42 ` ramana at gcc dot gnu dot org
  2010-08-16 14:21 ` lool at dooz dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-08-05 16:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ramana at gcc dot gnu dot org  2009-08-05 16:42 -------
Invalid testcase as per comment #6. 

(In reply to comment #4)
> I see the same problem when I try to compile transmission release 1.73. The
> error happens with file libtransmission/fdlimit.c. Works till -O1 but fails
> with -O2 or -O3. Seeing this error with gcc 4.21.
> 

Please file a separate bug report about this as per 
http://gcc.gnu.org/bugs.html if you can reproduce this for trunk or any of the
current release branches.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (6 preceding siblings ...)
  2009-08-05 16:42 ` ramana at gcc dot gnu dot org
@ 2010-08-16 14:21 ` lool at dooz dot org
  2010-08-16 14:22 ` lool at dooz dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: lool at dooz dot org @ 2010-08-16 14:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from lool at dooz dot org  2010-08-16 14:21 -------
I'm not sure how the .i ends up with a zero-length array; resolv.h has:
# define MAXNS                  3       /* max # name servers we'll track */
[...]
struct __res_state {
[...]
        struct sockaddr_in
                nsaddr_list[MAXNS];     /* address of name server */

so it should be [3], but it's [0] in the .i file attached here.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (7 preceding siblings ...)
  2010-08-16 14:21 ` lool at dooz dot org
@ 2010-08-16 14:22 ` lool at dooz dot org
  2010-08-16 14:34 ` tbm at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: lool at dooz dot org @ 2010-08-16 14:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from lool at dooz dot org  2010-08-16 14:22 -------
Also, even if it's invalid input, I guess gcc should never SEGV, but rather
throw an error out?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (8 preceding siblings ...)
  2010-08-16 14:22 ` lool at dooz dot org
@ 2010-08-16 14:34 ` tbm at gcc dot gnu dot org
  2010-08-16 14:35 ` tbm at gcc dot gnu dot org
  2010-08-16 14:40 ` lool at dooz dot org
  11 siblings, 0 replies; 14+ messages in thread
From: tbm at gcc dot gnu dot org @ 2010-08-16 14:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from tbm at gcc dot gnu dot org  2010-08-16 14:34 -------
Reopening since GCC should not ICE, even if the code is invalid.


-- 

tbm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tbm at cyrius dot com
           Keywords|ice-on-valid-code           |ice-on-invalid-code
   Last reconfirmed|2009-01-02 11:50:37         |2010-08-16 14:34:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (9 preceding siblings ...)
  2010-08-16 14:34 ` tbm at gcc dot gnu dot org
@ 2010-08-16 14:35 ` tbm at gcc dot gnu dot org
  2010-08-16 14:40 ` lool at dooz dot org
  11 siblings, 0 replies; 14+ messages in thread
From: tbm at gcc dot gnu dot org @ 2010-08-16 14:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from tbm at gcc dot gnu dot org  2010-08-16 14:35 -------
Reopening.


-- 

tbm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
  2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
                   ` (10 preceding siblings ...)
  2010-08-16 14:35 ` tbm at gcc dot gnu dot org
@ 2010-08-16 14:40 ` lool at dooz dot org
  11 siblings, 0 replies; 14+ messages in thread
From: lool at dooz dot org @ 2010-08-16 14:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from lool at dooz dot org  2010-08-16 14:40 -------
Ok, it's [0] because ziproxy uses "nsaddr" as an identifier for a local
variable which conflicts with a compatibility #define in glibc resolv.h. 
Renaming to "nsaddress" for instance fixes the build, so clearly bogus source
code.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/36466] internal compiler error: in choose_reload_regs, at reload1.c:6190
       [not found] <bug-36466-4@http.gcc.gnu.org/bugzilla/>
@ 2013-08-05 23:04 ` rearnsha at gcc dot gnu.org
  0 siblings, 0 replies; 14+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2013-08-05 23:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36466

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.6.0

--- Comment #13 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
gcc-4.6 seems to compile the code without generating an ICE.  However, versions
of gcc older than 4.7 are no-longer being maintained.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-05 23:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-08 14:31 [Bug target/36466] New: internal compiler error: in choose_reload_regs, at reload1.c:6190 aurelien at aurel32 dot net
2008-06-08 14:32 ` [Bug target/36466] " aurelien at aurel32 dot net
2009-01-02 11:52 ` laurent at guerby dot net
2009-01-02 11:55 ` laurent at guerby dot net
2009-08-04  6:52 ` nospamnoham at gmail dot com
2009-08-04 13:59 ` mikpe at it dot uu dot se
2009-08-04 14:07 ` mikpe at it dot uu dot se
2009-08-05 16:42 ` ramana at gcc dot gnu dot org
2010-08-16 14:21 ` lool at dooz dot org
2010-08-16 14:22 ` lool at dooz dot org
2010-08-16 14:34 ` tbm at gcc dot gnu dot org
2010-08-16 14:35 ` tbm at gcc dot gnu dot org
2010-08-16 14:40 ` lool at dooz dot org
     [not found] <bug-36466-4@http.gcc.gnu.org/bugzilla/>
2013-08-05 23:04 ` rearnsha at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).