public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215
@ 2012-07-03 23:53 vincenzo.innocente at cern dot ch
  2012-07-04  9:21 ` [Bug c++/53848] [4.8 regression] ICE in decl_linkage " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-07-03 23:53 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53848
           Summary: [4.8 regression] ICE in decl_linkage (decl=<optimized
                    out>) at ../../gcc-trunk/gcc/cp/tree.c:3215
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@cern.ch


Created attachment 27739
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27739
the curl header file that fails to compile

c++
/afs/cern.ch/cms/slc5_amd64_gcc470/external/curl/7.21.6-cms/include/curl/curl.h
-o bho.gch
/afs/cern.ch/cms/slc5_amd64_gcc470/external/curl/7.21.6-cms/include/curl/curl.h:621:5:
internal compiler error: Segmentation fault
     CURLKHTYPE_UNKNOWN,
     ^
Please submit a full bug report,


gdb 
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus...done.
(gdb) run  -v -D_GNU_SOURCE
/afs/cern.ch/cms/slc5_amd64_gcc470/external/curl/7.21.6-cms/include/curl/curl.h
-quiet -dumpbase curl.h -mtune=generic -march=x86-64 -auxbase curl -version -o
/tmp/innocent/ccQfRfNv.s --output-pch= bho.gch
Starting program:
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus
-v -D_GNU_SOURCE
/afs/cern.ch/cms/slc5_amd64_gcc470/external/curl/7.21.6-cms/include/curl/curl.h
-quiet -dumpbase curl.h -mtune=generic -march=x86-64 -auxbase curl -version -o
/tmp/innocent/ccQfRfNv.s --output-pch= bho.gch
reading VI .tcshrc
tty
set noglob;
setenv COLUMNS '181';
setenv LINES '55';
unset noglob;
GNU C++ (GCC) version 4.8.0 20120703 (experimental) [trunk revision 189240]
(x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.0 20120703 (experimental) [trunk revision
189240], GMP version 5.0.2, MPFR version 3.0.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0

/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu

/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward

/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include
 /usr/local/include
 /afs/cern.ch/user/i/innocent/w3/gcc47slc5/include

/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.8.0 20120703 (experimental) [trunk revision 189240]
(x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.0 20120703 (experimental) [trunk revision
189240], GMP version 5.0.2, MPFR version 3.0.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 2073c016257f59420b3d61accdcf522f

Program received signal SIGSEGV, Segmentation fault.
0x0000000000657aa0 in decl_linkage (decl=<optimized out>) at
../../gcc-trunk/gcc/cp/tree.c:3215
3215        return decl_linkage (TYPE_NAME (DECL_CONTEXT (decl)));
(gdb) where
#0  0x0000000000657aa0 in decl_linkage (decl=<optimized out>) at
../../gcc-trunk/gcc/cp/tree.c:3215
#1  0x00000000005b2f0e in retrofit_lang_decl (t=0x2aaaaae8b310) at
../../gcc-trunk/gcc/cp/lex.c:565
#2  0x00000000005b3081 in build_lang_decl_loc (loc=<optimized out>,
code=<optimized out>, name=<optimized out>, type=<optimized out>) at
../../gcc-trunk/gcc/cp/lex.c:533
#3  0x00000000004fb57c in build_enumerator (name=0x2aaaaad67b58,
value=<optimized out>, enumtype=0x2aaaaae8e7e0, loc=1897039) at
../../gcc-trunk/gcc/cp/decl.c:12567
#4  0x00000000005bfd61 in cp_parser_enumerator_definition (type=0x2aaaaae8e7e0,
parser=0x2aaaaad86688) at ../../gcc-trunk/gcc/cp/parser.c:14713
#5  cp_parser_enumerator_list (type=0x2aaaaae8e7e0, parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:14645
#6  cp_parser_enum_specifier (parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:14571
#7  cp_parser_type_specifier (parser=0x2aaaaad86688, flags=<optimized out>,
decl_specs=0x7fffffff9ec0, is_declaration=<optimized out>,
declares_class_or_enum=0x7fffffff9e3c, 
    is_cv_qualifier=<optimized out>) at ../../gcc-trunk/gcc/cp/parser.c:13366
#8  0x00000000005ce90e in cp_parser_decl_specifier_seq (parser=0x2aaaaad86688,
flags=1, decl_specs=0x7fffffff9ec0, declares_class_or_enum=0x7fffffff9eb4)
    at ../../gcc-trunk/gcc/cp/parser.c:10735
#9  0x00000000005bbf15 in cp_parser_member_declaration (parser=0x2aaaaad86688)
at ../../gcc-trunk/gcc/cp/parser.c:18908
#10 0x00000000005bcd5c in cp_parser_member_specification_opt (parser=<optimized
out>) at ../../gcc-trunk/gcc/cp/parser.c:18773
#11 cp_parser_class_specifier_1 (parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:18038
#12 0x00000000005bf577 in cp_parser_class_specifier (parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:18249
#13 cp_parser_type_specifier (parser=0x2aaaaad86688, flags=<optimized out>,
decl_specs=0x7fffffffa230, is_declaration=<optimized out>,
declares_class_or_enum=0x7fffffffa1ac, 
    is_cv_qualifier=<optimized out>) at ../../gcc-trunk/gcc/cp/parser.c:13394
#14 0x00000000005ce90e in cp_parser_decl_specifier_seq (parser=0x2aaaaad86688,
flags=1, decl_specs=0x7fffffffa230, declares_class_or_enum=0x7fffffffa22c)
    at ../../gcc-trunk/gcc/cp/parser.c:10735
#15 0x00000000005d725a in cp_parser_simple_declaration (parser=0x2aaaaad86688,
function_definition_allowed_p=true, maybe_range_for_decl=0x0)
    at ../../gcc-trunk/gcc/cp/parser.c:10378
#16 0x00000000005c12a8 in cp_parser_block_declaration (parser=0x2aaaaad86688,
statement_p=<optimized out>) at ../../gcc-trunk/gcc/cp/parser.c:10327
#17 0x00000000005e1ebc in cp_parser_declaration (parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:10223
#18 0x00000000005e21b8 in cp_parser_declaration_seq_opt (parser=0x2aaaaad86688)
at ../../gcc-trunk/gcc/cp/parser.c:10109
#19 0x00000000005e2580 in cp_parser_linkage_specification
(parser=0x2aaaaad86688) at ../../gcc-trunk/gcc/cp/parser.c:10925
#20 0x00000000005e1f38 in cp_parser_declaration (parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:10167
#21 0x00000000005e21b8 in cp_parser_declaration_seq_opt (parser=0x2aaaaad86688)
at ../../gcc-trunk/gcc/cp/parser.c:10109
#22 0x00000000005e28c3 in cp_parser_translation_unit (parser=0x2aaaaad86688) at
../../gcc-trunk/gcc/cp/parser.c:3761
#23 c_parse_file () at ../../gcc-trunk/gcc/cp/parser.c:27595
#24 0x00000000006e2e55 in c_common_parse_file () at
../../gcc-trunk/gcc/c-family/c-opts.c:1137
#25 0x0000000000a2c05c in compile_file () at ../../gcc-trunk/gcc/toplev.c:550
#26 0x0000000000a2db18 in do_compile () at ../../gcc-trunk/gcc/toplev.c:1867
#27 toplev_main (argc=16, argv=0x7fffffffa5d8) at
../../gcc-trunk/gcc/toplev.c:1943
#28 0x0000003a4f61d994 in __libc_start_main () from /lib64/libc.so.6
#29 0x00000000004c0a09 in _start ()
(gdb)


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
@ 2012-07-04  9:21 ` rguenth at gcc dot gnu.org
  2012-07-04 10:18 ` dimhen at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |c++
   Target Milestone|---                         |4.8.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 09:21:00 UTC ---
Backtrace is from the C++ frontend.


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
  2012-07-04  9:21 ` [Bug c++/53848] [4.8 regression] ICE in decl_linkage " rguenth at gcc dot gnu.org
@ 2012-07-04 10:18 ` dimhen at gmail dot com
  2012-07-04 10:19 ` dimhen at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dimhen at gmail dot com @ 2012-07-04 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dmitry G. Dyachenko <dimhen at gmail dot com> 2012-07-04 10:18:03 UTC ---
extern "C"
{
    struct s {
    enum {
        e = 0
    } f;
    };
}


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
  2012-07-04  9:21 ` [Bug c++/53848] [4.8 regression] ICE in decl_linkage " rguenth at gcc dot gnu.org
  2012-07-04 10:18 ` dimhen at gmail dot com
@ 2012-07-04 10:19 ` dimhen at gmail dot com
  2012-07-04 10:54 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dimhen at gmail dot com @ 2012-07-04 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dmitry G. Dyachenko <dimhen at gmail dot com> 2012-07-04 10:19:37 UTC ---
r189094 OK


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
                   ` (2 preceding siblings ...)
  2012-07-04 10:19 ` dimhen at gmail dot com
@ 2012-07-04 10:54 ` rguenth at gcc dot gnu.org
  2012-07-04 15:25 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-07-04
     Ever Confirmed|0                           |1

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 10:53:51 UTC ---
Confirmed.

Program received signal SIGSEGV, Segmentation fault.
0x000000000080dbfe in decl_linkage (decl=0x7ffff6f5cd90)
    at /space/rguenther/src/svn/trunk/gcc/cp/tree.c:3215
3215        return decl_linkage (TYPE_NAME (DECL_CONTEXT (decl)));
(gdb) l
3210        return lk_external;
3211
3212      /* Linkage of a CONST_DECL depends on the linkage of the enumeration
3213         type.  */
3214      if (TREE_CODE (decl) == CONST_DECL)
3215        return decl_linkage (TYPE_NAME (DECL_CONTEXT (decl)));
3216
3217      /* Some things that are not TREE_PUBLIC have external linkage, too.
3218         For example, on targets that don't have weak symbols, we make all
3219         template instantiations have internal linkage (in the object
(gdb) call debug_tree (decl)
 <const_decl 0x7ffff6f5cd90 e
    type <integer_type 0x7ffff6f775e8 int public SI
        size <integer_cst 0x7ffff6f7d100 constant 32>
        unit size <integer_cst 0x7ffff6f7d120 constant 4>
        align 32 symtab 0 alias set -1 canonical type 0x7ffff6f775e8 precision
32 min <integer_cst 0x7ffff6f7d0a0 -2147483648> max <integer_cst 0x7ffff6f7d0c0
2147483647>
        pointer_to_this <pointer_type 0x7ffff6f852a0>>
    VOID file t.ii line 5 col 10
    align 1
   >

no DECL_CONTEXT.


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
                   ` (3 preceding siblings ...)
  2012-07-04 10:54 ` rguenth at gcc dot gnu.org
@ 2012-07-04 15:25 ` hjl.tools at gmail dot com
  2012-07-04 21:34 ` jason at gcc dot gnu.org
  2012-07-04 21:43 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-04 15:25 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-04 15:25:03 UTC ---
It is caused by revision 189174:

http://gcc.gnu.org/ml/gcc-cvs/2012-07/msg00078.html


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
                   ` (4 preceding siblings ...)
  2012-07-04 15:25 ` hjl.tools at gmail dot com
@ 2012-07-04 21:34 ` jason at gcc dot gnu.org
  2012-07-04 21:43 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2012-07-04 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2012-07-04 21:34:12 UTC ---
Author: jason
Date: Wed Jul  4 21:34:07 2012
New Revision: 189267

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189267
Log:
    PR c++/53848
    * decl.c (build_enumerator): Don't use build_lang_decl_loc.

Added:
    trunk/gcc/testsuite/g++.dg/other/enum3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/53848] [4.8 regression] ICE in decl_linkage  at ../../gcc-trunk/gcc/cp/tree.c:3215
  2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
                   ` (5 preceding siblings ...)
  2012-07-04 21:34 ` jason at gcc dot gnu.org
@ 2012-07-04 21:43 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2012-07-04 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2012-07-04 21:43:08 UTC ---
Fixed.


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

end of thread, other threads:[~2012-07-04 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03 23:53 [Bug middle-end/53848] New: [4.8 regression] ICE in decl_linkage (decl=<optimized out>) at ../../gcc-trunk/gcc/cp/tree.c:3215 vincenzo.innocente at cern dot ch
2012-07-04  9:21 ` [Bug c++/53848] [4.8 regression] ICE in decl_linkage " rguenth at gcc dot gnu.org
2012-07-04 10:18 ` dimhen at gmail dot com
2012-07-04 10:19 ` dimhen at gmail dot com
2012-07-04 10:54 ` rguenth at gcc dot gnu.org
2012-07-04 15:25 ` hjl.tools at gmail dot com
2012-07-04 21:34 ` jason at gcc dot gnu.org
2012-07-04 21:43 ` jason 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).