public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g
@ 2011-11-08 23:08 hp at gcc dot gnu.org
  2011-11-09  9:25 ` [Bug c++/51043] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hp at gcc dot gnu.org @ 2011-11-08 23:08 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51043
           Summary: [4.7 Regression]: g++.dg/lto/20100423-3
                    cp_lto_20100423-3_0.o assemble, -flto -g
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
                CC: dodji@gcc.gnu.org, jason@gcc.gnu.org
              Host: x86_64-unknown-linux-gnu
            Target: cris-axis-elf


This test previously passed, now it fails.
A patch in the revision range (last_known_working:first_known_failing)
181113:181134 exposed or caused these regressions.  Since then, up to and
including at least r181179 it fails as follows:

Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/lto/lto.exp ...
...
FAIL: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g (internal
compiler error)

The message in g++.log says:

xecuting on host:
/tmp/hpautotest-gcc1/cris-elf/gccobj/gcc/testsuite/g++/../../g++
-B/tmp/hpautotest-gcc1/cris-elf/gccobj/gcc/testsuite/g++/../../   -nostdinc++
-I/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cris-elf
-I/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include
-I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/libsupc++
-I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/include/backward
-I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -flto
-g   -c   -isystem
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib/targ-include -isystem
/tmp/hpautotest-gcc1/gcc/newlib/libc/include  -o cp_lto_20100423-3_0.o
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/lto/20100423-3_0.C    (timeout =
300)
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/lto/20100423-3_0.C: In function
'foo()':
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/lto/20100423-3_0.C:8:1: internal
compiler error: Segmentation fault

And the segfault; from gdb:

Starting program: /tmp/hpautotest-gcc1/cris-elf/gccobj/gcc/cc1plus
-fpreprocessed 20100423-3_0.ii -melf -quiet -dumpbase 20100423-3_0.C
-auxbase-strip cp_lto_20100423-3_0.o -g -version -fmessage-length=0 -flto -o
20100423-3_0.s
GNU C++ (GCC) version 4.7.0 20111108 (experimental) [trunk revision 181179]
(cris-elf)
        compiled by GNU C version 4.4.3 20100127 (Red Hat 4.4.3-4), GMP version
4.3.0, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.7.0 20111108 (experimental) [trunk revision 181179]
(cris-elf)
        compiled by GNU C version 4.4.3 20100127 (Red Hat 4.4.3-4), GMP version
4.3.0, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4633978199e671cd4ac0b784666452ee

Program received signal SIGSEGV, Segmentation fault.
0x00000000004c6d17 in get_template_info (t=0x7ffff7ef9738) at
/tmp/hpautotest-gcc1/gcc/gcc/cp/pt.c:332
332         tinfo = TYPE_TEMPLATE_INFO (t);
(gdb) p t
$1 = (const union tree_node *) 0x7ffff7ef9738
(gdb) pt
 <union_type 0x7ffff7ef9738 sizes-gimplified type_5 SI
    size <integer_cst 0x7ffff7dc5ba0 type <integer_type 0x7ffff7dd90a8
bitsizetype> constant 32>
    unit size <integer_cst 0x7ffff7dc5bc0 type <integer_type 0x7ffff7dd9000
sizetype> constant 4>
    align 8 symtab -136395520 alias set -1 canonical type 0x7ffff7ef9738
    fields <field_decl 0x7ffff7ef42f8 i
        type <integer_type 0x7ffff7dd95e8 int sizes-gimplified asm_written
public SI size <integer_cst 0x7ffff7dc5ba0 32> unit size <integer_cst
0x7ffff7dc5bc0 4>
            align 8 symtab -136395680 alias set 0 canonical type 0x7ffff7dd95e8
precision 32 min <integer_cst 0x7ffff7dc5ec0 -2147483648> max <integer_cst
0x7ffff7dc5ee0 2147483647>
            pointer_to_this <pointer_type 0x7ffff7de72a0>>
        used nonlocal decl_3 SI file
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/g++.dg/lto/20100423-3_0.C line 6 col 22
size <integer_cst 0x7ffff7dc5ba0 32> unit size <integer_cst 0x7ffff7dc5bc0 4>
        align 8 offset_align 8
        offset <integer_cst 0x7ffff7dc5be0 constant 0>
        bit offset <integer_cst 0x7ffff7dc5c40 constant 0> context <union_type
0x7ffff7ef9738>> context <function_decl 0x7ffff7efb200 foo>
    full-name "union<anonymous>"

    pointer_to_this <pointer_type 0x7ffff7ef9d20> chain <type_decl
0x7ffff7ef32e0 ._0>>
(gdb) bt
#0  0x00000000004c6d17 in get_template_info (t=0x7ffff7ef9738) at
/tmp/hpautotest-gcc1/gcc/gcc/cp/pt.c:332
#1  0x00000000004c7276 in get_primary_template_innermost_parameters
(t=0x7ffff7ef9738)
    at /tmp/hpautotest-gcc1/gcc/gcc/cp/pt.c:2900
#2  0x0000000000792161 in generic_type_p (type=<value optimized out>,
context_die=<value optimized out>, 
    usage=<value optimized out>) at
/tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:20045
#3  schedule_generic_params_dies_gen (type=<value optimized out>,
context_die=<value optimized out>, 
    usage=<value optimized out>) at
/tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:20055
#4  gen_struct_or_union_type_die (type=<value optimized out>,
context_die=<value optimized out>, 
    usage=<value optimized out>) at
/tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:18594
#5  0x000000000078cf49 in gen_tagged_type_die (type=0x7ffff7ef9738,
context_die=0x7ffff7dec410, 
    usage=DINFO_USAGE_DIR_USE) at
/tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:18802
#6  0x000000000077f3ef in gen_type_die_with_usage (type=0x7ffff7ef9738,
context_die=0x7ffff7dec4b0, 
    usage=DINFO_USAGE_DIR_USE) at
/tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:18952
#7  0x000000000078e3c5 in gen_decl_die (decl=0x7ffff7ef32e0, origin=0x0,
context_die=0x7ffff7dec4b0)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:19512
#8  0x000000000077adb0 in decls_for_scope (stmt=0x7ffff7dec050,
context_die=0x7ffff7dec4b0, depth=1)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:19125
#9  0x0000000000793771 in gen_lexical_block_die (stmt=0x7ffff7dec050,
context_die=<value optimized out>, depth=1)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:18111
#10 gen_block_die (stmt=0x7ffff7dec050, context_die=<value optimized out>,
depth=1)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:19075
#11 0x000000000077ae3e in decls_for_scope (stmt=<value optimized out>,
context_die=0x7ffff7dec410, 
    depth=<value optimized out>) at
/tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:19139
#12 0x000000000077b313 in gen_subprogram_die (decl=<value optimized out>,
context_die=<value optimized out>)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:17555
#13 0x000000000078e187 in gen_decl_die (decl=0x7ffff7efb200, origin=<value
optimized out>, context_die=0x7ffff7dec000)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:19489
#14 0x000000000078f119 in dwarf2out_function_decl (decl=<value optimized out>)
    at /tmp/hpautotest-gcc1/gcc/gcc/dwarf2out.c:19871
#15 0x00000000007d4a1d in rest_of_handle_final () at
/tmp/hpautotest-gcc1/gcc/gcc/final.c:4258
#16 0x00000000009358c2 in execute_one_pass (pass=0x1135b60) at
/tmp/hpautotest-gcc1/gcc/gcc/passes.c:2074
#17 0x0000000000935bd5 in execute_pass_list (pass=0x1135b60) at
/tmp/hpautotest-gcc1/gcc/gcc/passes.c:2129
#18 0x0000000000935be7 in execute_pass_list (pass=0x1136920) at
/tmp/hpautotest-gcc1/gcc/gcc/passes.c:2130
#19 0x0000000000935be7 in execute_pass_list (pass=0x11368c0) at
/tmp/hpautotest-gcc1/gcc/gcc/passes.c:2130
#20 0x0000000000a213f8 in tree_rest_of_compilation (fndecl=0x7ffff7efb200)
    at /tmp/hpautotest-gcc1/gcc/gcc/tree-optimize.c:420
#21 0x00000000007263ea in cgraph_expand_function (node=0x7ffff7efe240)
    at /tmp/hpautotest-gcc1/gcc/gcc/cgraphunit.c:1819
#22 0x0000000000729dfb in cgraph_output_in_order () at
/tmp/hpautotest-gcc1/gcc/gcc/cgraphunit.c:1984
#23 cgraph_optimize () at /tmp/hpautotest-gcc1/gcc/gcc/cgraphunit.c:2192
#24 0x000000000072a14f in cgraph_finalize_compilation_unit () at
/tmp/hpautotest-gcc1/gcc/gcc/cgraphunit.c:1327
#25 0x000000000055472e in cp_write_global_declarations () at
/tmp/hpautotest-gcc1/gcc/gcc/cp/decl2.c:4049
#26 0x00000000009b551f in compile_file () at
/tmp/hpautotest-gcc1/gcc/gcc/toplev.c:581
#27 do_compile () at /tmp/hpautotest-gcc1/gcc/gcc/toplev.c:1931
#28 0x00000000009b5b92 in toplev_main (argc=15, argv=0x7fffffffe058) at
/tmp/hpautotest-gcc1/gcc/gcc/toplev.c:2007
#29 0x00000037d421eb1d in __libc_start_main () from /lib64/libc.so.6
#30 0x00000000004723d9 in _start ()


I hope I don't think I need to attach this (but that LTO thingy makes things
less certain):

inline int foo()
{
  static union { int i; };
  return i;
}

void bar()
{
  foo();
}

CC to C++-people pointed out by gdb session cross-referenced with the changes
in the revision range.

There were several C++-related as well as a target-specific commit in the
quoted interval, and the first revision was from a regress-2230 state (to
regress-8, though the quoted test was not one of those in the former), so I'll
bisect, though it seems somewhat clear.


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

* [Bug c++/51043] [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g
  2011-11-08 23:08 [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g hp at gcc dot gnu.org
@ 2011-11-09  9:25 ` rguenth at gcc dot gnu.org
  2011-11-09 14:42 ` dodji at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-09  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|cris-axis-elf               |
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |lto
   Last reconfirmed|                            |2011-11-09
          Component|regression                  |c++
               Host|x86_64-unknown-linux-gnu    |
             Blocks|                            |47819
     Ever Confirmed|0                           |1
   Target Milestone|---                         |4.7.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-09 09:19:59 UTC ---
I've seen this on x86_64 and i?86 as well, so it's not target dependent.


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

* [Bug c++/51043] [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g
  2011-11-08 23:08 [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g hp at gcc dot gnu.org
  2011-11-09  9:25 ` [Bug c++/51043] " rguenth at gcc dot gnu.org
@ 2011-11-09 14:42 ` dodji at gcc dot gnu.org
  2011-11-09 17:46 ` dodji at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-11-09 14:42 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|dodji at gcc dot gnu.org    |
         AssignedTo|unassigned at gcc dot       |dodji at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/51043] [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g
  2011-11-08 23:08 [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g hp at gcc dot gnu.org
  2011-11-09  9:25 ` [Bug c++/51043] " rguenth at gcc dot gnu.org
  2011-11-09 14:42 ` dodji at gcc dot gnu.org
@ 2011-11-09 17:46 ` dodji at gcc dot gnu.org
  2011-11-09 19:29 ` dodji at gcc dot gnu.org
  2011-11-09 19:39 ` dodji at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-11-09 17:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-11-09 17:38:59 UTC ---
A patch for this was submitted to
http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01324.html


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

* [Bug c++/51043] [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g
  2011-11-08 23:08 [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g hp at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-11-09 17:46 ` dodji at gcc dot gnu.org
@ 2011-11-09 19:29 ` dodji at gcc dot gnu.org
  2011-11-09 19:39 ` dodji at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-11-09 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-11-09 19:25:07 UTC ---
Author: dodji
Date: Wed Nov  9 19:25:01 2011
New Revision: 181231

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181231
Log:
PR c++/51043 - ICE in LTO

    * cp-tree.h (TYPE_ALIAS_P, TYPE_TEMPLATE_INFO): Don't crash on
    NULL TYPE_NAME.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h


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

* [Bug c++/51043] [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g
  2011-11-08 23:08 [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g hp at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-11-09 19:29 ` dodji at gcc dot gnu.org
@ 2011-11-09 19:39 ` dodji at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-11-09 19:39 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-11-09 19:28:50 UTC ---
This should be fixed in trunk (4.7).


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

end of thread, other threads:[~2011-11-09 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 23:08 [Bug regression/51043] New: [4.7 Regression]: g++.dg/lto/20100423-3 cp_lto_20100423-3_0.o assemble, -flto -g hp at gcc dot gnu.org
2011-11-09  9:25 ` [Bug c++/51043] " rguenth at gcc dot gnu.org
2011-11-09 14:42 ` dodji at gcc dot gnu.org
2011-11-09 17:46 ` dodji at gcc dot gnu.org
2011-11-09 19:29 ` dodji at gcc dot gnu.org
2011-11-09 19:39 ` dodji 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).