public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565
@ 2003-11-24 11:50 jdc at coris dot org dot uk
  2003-11-24 15:29 ` [Bug c++/13173] [3.3 regression] ICE in convert_move bangerth at dealii dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jdc at coris dot org dot uk @ 2003-11-24 11:50 UTC (permalink / raw)
  To: gcc-bugs

The compiler ICE's with the following output:

  $ gcc -v -save-temps -c -o zz.o zz.C
  Using built-in specs.
  Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --build=i386-unknown-netbsdelf --host=sparc--netbsdelf --target=sparc--netbsdelf
  Thread model: posix
  gcc version 3.3.2 (NetBSD nb1 20031026)
   /usr/bin/../libexec/cc1plus -E -D__GNUG__=3 -quiet -v -iprefix /usr/bin/../libexec/sparc--netbsdelf/3.3.2/ -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc zz.C zz.ii
  ignoring nonexistent directory "/usr/libexec/sparc--netbsdelf/3.3.2/include/g++"
  ignoring nonexistent directory "/usr/libexec/sparc--netbsdelf/3.3.2/include/g++/backward"
  ignoring nonexistent directory "/usr/libexec/sparc--netbsdelf/3.3.2/include"
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/include/g++
   /usr/include/g++/backward
   /usr/include
  End of search list.
   /usr/bin/../libexec/cc1plus -fpreprocessed zz.ii -quiet -dumpbase zz.C -auxbase-strip zz.o -version -o zz.s
  GNU C++ version 3.3.2 (NetBSD nb1 20031026) (NetBSD/sparc ELF)
          compiled by GNU C version 3.3.2 (NetBSD nb1 20031026).
  GGC heuristics: --param ggc-min-expand=34 --param ggc-min-heapsize=8192
  zz.C: In function `void parse_va(char*)':
  zz.C:2: internal compiler error: in convert_move, at expr.c:565
  Please submit a full bug report,
  with preprocessed source if appropriate.

when given the input:

  #include <stdarg.h>
  static void parse_va(va_list ap) { double val = va_arg(ap, double); }

and the file extension is .C, .c++ or .cpp (i.e. not if the file
extension is .c).

The preprocessed file (zz.ii) is:

  # 1 "zz.C"
  # 1 "<built-in>"
  # 1 "<command line>"
  # 1 "zz.C"
  # 1 "/usr/include/stdarg.h" 1 3 4
  # 46 "/usr/include/stdarg.h" 3 4
  # 1 "/usr/include/machine/ansi.h" 1 3 4
  # 37 "/usr/include/machine/ansi.h" 3 4
  # 1 "/usr/include/machine/int_types.h" 1 3 4
  # 52 "/usr/include/machine/int_types.h" 3 4
  typedef __signed char __int8_t;
  typedef unsigned char __uint8_t;
  typedef short int __int16_t;
  typedef unsigned short int __uint16_t;
  typedef int __int32_t;
  typedef unsigned int __uint32_t;
  # 70 "/usr/include/machine/int_types.h" 3 4
  typedef long long int __int64_t;
  
  typedef unsigned long long int __uint64_t;
  
  
  
  
  
  
  
  typedef long int __intptr_t;
  typedef unsigned long int __uintptr_t;
  # 38 "/usr/include/machine/ansi.h" 2 3 4
  # 86 "/usr/include/machine/ansi.h" 3 4
  typedef union {
          char __mbstate8[128];
          __int64_t __mbstateL;
  } __mbstate_t;
  # 47 "/usr/include/stdarg.h" 2 3 4
  # 1 "/usr/include/sys/featuretest.h" 1 3 4
  # 48 "/usr/include/stdarg.h" 2 3 4
  
  typedef char * va_list;
  # 2 "zz.C" 2
  static void parse_va(va_list ap) { double val = (__builtin_classify_type(*(double *)0) >= 12 ? *(*(double * *)((ap) += (((sizeof(double *) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)), (ap) - (sizeof(double *) < sizeof(long) && sizeof(double *) != (((sizeof(double *) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) ? sizeof(double *) : 
   (((sizeof(double *) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))))) : (((sizeof(double) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) == 8 ? __extension__ ({ union { char __d[sizeof(double)]; int __i[2]; } __va_u; __va_u.__i[0] = ((int *)(void *)(ap))[0]; __va_u.__i[1] = ((int *)(void *)(ap))[1]; (ap) += 8; *(double *)(va_list)__va_u.__d; }) :
   (*(double *)((ap) += (((sizeof(double) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)), (ap) - (sizeof(double) < sizeof(long) && sizeof(double) != (((sizeof(double) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) ? sizeof(double) : (((sizeof(double) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)))))); }

Note that the final line has been split into 3 lines in order to fit
into the form.  The preprocessor output from the same file but named
zz.c (i.e. zz.i) is the same as the above but with all instances of
zz.C replaced with zz.c.  It compiles without problems.

-- 
           Summary: internal compiler error: in convert_move, at expr.c:565
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jdc at coris dot org dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc--netbsdelf
  GCC host triplet: sparc--netbsdelf
GCC target triplet: sparc--netbsdelf


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
@ 2003-11-24 15:29 ` bangerth at dealii dot org
  2003-11-24 15:42 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2003-11-24 15:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2003-11-24 15:29 -------
Confirmed. The original testcase doesn't ICE on x86 linux, but that's
only because of a different definition of va_list. Here's something
that also crashes on my box:
------------------
void foo() {
  double val
    = (1 ?
       __extension__ ({ char d[8]; *(double *)(char*)d; })
       :
       *(double *)0);
}
-------------------
g/x> /home/bangerth/bin/gcc-3.3.2/bin/c++ -c x.cc
x.cc: In function `void foo()':
x.cc:4: internal compiler error: in convert_move, at expr.c:565
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This is a regression on 3.2 and 3.3 with respect to previous versions.
It is fixed on mainline, though.

W.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-24 15:29:52
               date|                            |
            Summary|internal compiler error: in |[3.3 regression] ICE in
                   |convert_move, at expr.c:565 |convert_move
   Target Milestone|---                         |3.3.3


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
  2003-11-24 15:29 ` [Bug c++/13173] [3.3 regression] ICE in convert_move bangerth at dealii dot org
@ 2003-11-24 15:42 ` pinskia at gcc dot gnu dot org
  2003-11-24 16:35 ` bangerth at dealii dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-24 15:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-24 15:42 -------
Here is the dates that it was fixed on the mainline (From Phil's regression hunter): Search 
converges between 2003-07-31-trunk (#359) and 2003-08-01-trunk (#360).
Looks like this patch: <http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02851.html> fixed it for 
the mainline, it looks like it will **NOT** apply directly to 3.3.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
  2003-11-24 15:29 ` [Bug c++/13173] [3.3 regression] ICE in convert_move bangerth at dealii dot org
  2003-11-24 15:42 ` pinskia at gcc dot gnu dot org
@ 2003-11-24 16:35 ` bangerth at dealii dot org
  2003-11-24 16:37 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2003-11-24 16:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2003-11-24 16:35 -------
The cited patch might have triggered the fix for this one as well,
but there may be a simpler patch since Nathan clearly says that this
is about statement expressions for non-POD type -- which is not
the case here.

W.

-- 


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
                   ` (2 preceding siblings ...)
  2003-11-24 16:35 ` bangerth at dealii dot org
@ 2003-11-24 16:37 ` bangerth at dealii dot org
  2003-11-25 11:57 ` jdc at coris dot org dot uk
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2003-11-24 16:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2003-11-24 16:37 -------
Thinking about it again, this is even simpler:
--------------------
void foo() {
  double val
    = (1 ?
       ({ *(double *)0; })
       :
       *(double *)0);
}
---------------------
and still triggers the same ICE.

W.

-- 


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
                   ` (3 preceding siblings ...)
  2003-11-24 16:37 ` bangerth at dealii dot org
@ 2003-11-25 11:57 ` jdc at coris dot org dot uk
  2003-12-04  0:37 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jdc at coris dot org dot uk @ 2003-11-25 11:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jdc at coris dot org dot uk  2003-11-25 11:57 -------
Thanks for the fast responses.

When I try the simpler code on sparc/gcc-3.3.2, it compiles OK.
However, on alpha/gcc-3.3.2, I see:

  $ c++ -c -o yy.o yy.C
  yy.C: In function `void foo()':
  yy.C:7: error: unrecognizable insn:
  (insn 17 23 18 0 0x160545600 (set (reg:DF 69)
          (const_int 0 [0x0])) -1 (nil)
      (expr_list:REG_EQUAL (const_int 0 [0x0])
          (nil)))
  yy.C:7: internal compiler error: in extract_insn, at recog.c:2175
  Please submit a full bug report,

Again, the code compiles file with cc.

-- 


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
                   ` (4 preceding siblings ...)
  2003-11-25 11:57 ` jdc at coris dot org dot uk
@ 2003-12-04  0:37 ` reichelt at gcc dot gnu dot org
  2003-12-04  1:34 ` gdr at integrable-solutions dot net
  2003-12-24 22:25 ` gdr at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-12-04  0:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2003-12-04 00:37 -------
Here's an even shorter testcase that triggers the ICE in extract_insn
on i686-pc-linux-gnu.

======================================
double foo()
{
    return ({ *(double*)0; });
}
======================================

Note that the C frontend compiles this testcase without problems.


-- 


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
                   ` (5 preceding siblings ...)
  2003-12-04  0:37 ` reichelt at gcc dot gnu dot org
@ 2003-12-04  1:34 ` gdr at integrable-solutions dot net
  2003-12-24 22:25 ` gdr at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-12-04  1:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2003-12-04 01:34 -------
Subject: Re:  [3.3 regression] ICE in convert_move

"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| double foo()
| {
|     return ({ *(double*)0; });

down with statement-expressions!

-- Gaby


-- 


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


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

* [Bug c++/13173] [3.3 regression] ICE in convert_move
  2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
                   ` (6 preceding siblings ...)
  2003-12-04  1:34 ` gdr at integrable-solutions dot net
@ 2003-12-24 22:25 ` gdr at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: gdr at gcc dot gnu dot org @ 2003-12-24 22:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2003-12-24 22:10 -------
I don't anticipate a backport from mainline.

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


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


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

end of thread, other threads:[~2003-12-24 22:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-24 11:50 [Bug c++/13173] New: internal compiler error: in convert_move, at expr.c:565 jdc at coris dot org dot uk
2003-11-24 15:29 ` [Bug c++/13173] [3.3 regression] ICE in convert_move bangerth at dealii dot org
2003-11-24 15:42 ` pinskia at gcc dot gnu dot org
2003-11-24 16:35 ` bangerth at dealii dot org
2003-11-24 16:37 ` bangerth at dealii dot org
2003-11-25 11:57 ` jdc at coris dot org dot uk
2003-12-04  0:37 ` reichelt at gcc dot gnu dot org
2003-12-04  1:34 ` gdr at integrable-solutions dot net
2003-12-24 22:25 ` gdr at gcc dot gnu dot 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).