public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67641] New: gcc segfaults when compiling in debug mode
@ 2015-09-19 22:44 ryan.burn at gmail dot com
  2015-09-20  4:58 ` [Bug c++/67641] internal error " trippels at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: ryan.burn at gmail dot com @ 2015-09-19 22:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67641

            Bug ID: 67641
           Summary: gcc segfaults when compiling in debug mode
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

Created attachment 36350
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36350&action=edit
files to reproduce

The below steps cause gcc to segfault when building with a recent version from
trunk:

g++ (GCC) 6.0.0 20150915 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## Steps to Reproduce
1. unpack the tartar (I couldn't reproduce if I preprocessed the code)
2. Change into the director and run the following
g++ -I. -g -c -o core-test.o core-test.cpp

## Stack Trace
rnburn@localhost ~/bugs/gcc_test_segfault/segfault $ /home/rnburn/local/bin/g++
-I. -g -c -o core-test.o core-test.cpp 
In file included from /home/rnburn/local/include/c++/6.0.0/map:61:0,
                 from ./catch.hpp:3331,
                 from core-test.cpp:2:
/home/rnburn/local/include/c++/6.0.0/bits/stl_map.h: In instantiation of ‘class
std::map<std::__cxx11::basic_string<char>,
Catch::SectionTracking::TrackedSection>’:
./catch.hpp:4856:25:   required from here
/home/rnburn/local/include/c++/6.0.0/bits/stl_map.h:96:11: error:
TYPE_CANONICAL is not compatible
     class map
           ^
 <record_type 0x7f7fef075498 TrackedSection readonly type_1 type_5 type_6 VOID
    align 8 symtab 0 alias set -1 canonical type 0x7f7fef075498
    fields <const_decl 0x7f7fef856700 Completed
        type <enumeral_type 0x7f7fef0731f8 RunState type <integer_type
0x7f7fef0732a0 unsigned int>
            asm_written unsigned SI
            size <integer_cst 0x7f7ff440c0a8 constant 32>
            unit size <integer_cst 0x7f7ff440c0c0 constant 4>
            align 32 symtab -291691504 alias set -1 canonical type
0x7f7fef0731f8 precision 32 min <integer_cst 0x7f7ff440c0d8 0> max <integer_cst
0x7f7ff440c090 4294967295>
            values <tree_list 0x7f7fef40aa50
                purpose <identifier_node 0x7f7ff31c8aa8 NotStarted
                    bindings <(nil)>
                    local bindings <(nil)>> value <const_decl 0x7f7fef8564d0
NotStarted>
                chain <tree_list 0x7f7fef40aa78
                    purpose <identifier_node 0x7f7ff31c8b00 Executing
                        bindings <(nil)>
                        local bindings <(nil)>> value <const_decl
0x7f7fef8565b0 Executing>
                    chain <tree_list 0x7f7fef40aac8
                        purpose <identifier_node 0x7f7ff31c8b58
ExecutingChildren
                            bindings <(nil)>
                            local bindings <(nil)>> value <const_decl
0x7f7fef856620 ExecutingChildren>
                        chain <tree_list 0x7f7fef40aaf0 purpose
<identifier_node 0x7f7ff31c8bb0 Completed> value <const_decl 0x7f7fef856700
Completed>>>>> context <record_type 0x7f7fef071d20 TrackedSection>
            chain <type_decl 0x7f7fee9b7850 RunState>>
        readonly constant VOID file ./catch.hpp line 4811 col 13
        align 1 context <enumeral_type 0x7f7fef0731f8 RunState> initial
<integer_cst 0x7f7ff13ccf18 3>
        chain <const_decl 0x7f7fef856620 ExecutingChildren type <enumeral_type
0x7f7fef0731f8 RunState>
            readonly constant VOID file ./catch.hpp line 4810 col 13
            align 1 context <enumeral_type 0x7f7fef0731f8 RunState> initial
<integer_cst 0x7f7ff13ccee8 2> chain <const_decl 0x7f7fef8565b0 Executing>>>
context <namespace_decl 0x7f7fee9a7558 SectionTracking>
    full-name "const class Catch::SectionTracking::TrackedSection"
    n_parents=0 use_template=0 interface-unknown
    pointer_to_this <pointer_type 0x7f7fef0755e8> reference_to_this
<reference_type 0x7f7feeb6a0a8>>
 <record_type 0x7f7feeb63f18 mapped_type readonly used type_1 type_5 type_6
VOID
    align 8 symtab 0 alias set -1 canonical type 0x7f7fef075498
    fields <field_decl 0x7f7fee9b7ed8 m_runState
        type <enumeral_type 0x7f7fef0731f8 RunState type <integer_type
0x7f7fef0732a0 unsigned int>
            asm_written unsigned SI
            size <integer_cst 0x7f7ff440c0a8 constant 32>
            unit size <integer_cst 0x7f7ff440c0c0 constant 4>
            align 32 symtab -291691504 alias set -1 canonical type
0x7f7fef0731f8 precision 32 min <integer_cst 0x7f7ff440c0d8 0> max <integer_cst
0x7f7ff440c090 4294967295>
            values <tree_list 0x7f7fef40aa50
                purpose <identifier_node 0x7f7ff31c8aa8 NotStarted
                    bindings <(nil)>
                    local bindings <(nil)>> value <const_decl 0x7f7fef8564d0
NotStarted>
                chain <tree_list 0x7f7fef40aa78
                    purpose <identifier_node 0x7f7ff31c8b00 Executing
                        bindings <(nil)>
                        local bindings <(nil)>> value <const_decl
0x7f7fef8565b0 Executing>
                    chain <tree_list 0x7f7fef40aac8
                        purpose <identifier_node 0x7f7ff31c8b58
ExecutingChildren
                            bindings <(nil)>
                            local bindings <(nil)>> value <const_decl
0x7f7fef856620 ExecutingChildren>
                        chain <tree_list 0x7f7fef40aaf0 purpose
<identifier_node 0x7f7ff31c8bb0 Completed> value <const_decl 0x7f7fef856700
Completed>>>>> context <record_type 0x7f7fef071d20 TrackedSection>
            chain <type_decl 0x7f7fee9b7850 RunState>>
        private decl_3 VOID file ./catch.hpp line 4855 col 18
        align 1 offset_align 1 context <record_type 0x7f7fef071d20
TrackedSection>
        chain <field_decl 0x7f7fee9b7da8 m_name type <record_type
0x7f7ff3202c78 string>
            private decl_3 VOID file ./catch.hpp line 4854 col 21
            align 1 offset_align 1 context <record_type 0x7f7fef071d20
TrackedSection> chain <const_decl 0x7f7fef856700 Completed>>> context
<namespace_decl 0x7f7fee9a7558 SectionTracking>
    full-name "const mapped_type"
    n_parents=0 use_template=0 interface-unknown reference_to_this
<reference_type 0x7f7feeb6a000>>
/home/rnburn/local/include/c++/6.0.0/bits/stl_map.h:96:11: internal compiler
error: verify_type failed
0xf4a3e9 verify_type(tree_node const*)
        ../../gcc/gcc/tree.c:13583
0x9ab124 gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20707
0x9abc40 gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20805
0x9ac7a6 gen_type_die
        ../../gcc/gcc/dwarf2out.c:20901
0x9b905f gen_decl_die
        ../../gcc/gcc/dwarf2out.c:21448
0x9aaacc gen_member_die
        ../../gcc/gcc/dwarf2out.c:20399
0x9aaacc gen_struct_or_union_type_die
        ../../gcc/gcc/dwarf2out.c:20483
0x9aaacc gen_tagged_type_die
        ../../gcc/gcc/dwarf2out.c:20684
0x9abc0d gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20846
0x9ac7a6 gen_type_die
        ../../gcc/gcc/dwarf2out.c:20901
0x9b8de1 gen_decl_die
        ../../gcc/gcc/dwarf2out.c:21487
0x9b989c dwarf2out_decl
        ../../gcc/gcc/dwarf2out.c:21937
0x9b9bcb dwarf2out_type_decl
        ../../gcc/gcc/dwarf2out.c:21647
0xbe84af rest_of_type_compilation(tree_node*, int)
        ../../gcc/gcc/passes.c:339
0x6cfaec finish_struct_1(tree_node*)
        ../../gcc/gcc/cp/class.c:6747
0x6976ac instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:10201
0x6976ac instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:10241
0x73c8ab complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:138
0x63c8a9 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ../../gcc/gcc/cp/decl.c:11053
0x6dff15 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
        ../../gcc/gcc/cp/decl2.c:878
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-497589-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 20 02:25:22 2015
Return-Path: <gcc-bugs-return-497589-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22142 invoked by alias); 20 Sep 2015 02:25:19 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22096 invoked by uid 48); 20 Sep 2015 02:25:12 -0000
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67642] New: [SH] FPSCR not saved,loaded,restored for ISRs and single-precision-only FPU
Date: Sun, 20 Sep 2015 02:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: olegendo at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget
Message-ID: <bug-67642-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg01567.txt.bz2
Content-length: 972

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg642

            Bug ID: 67642
           Summary: [SH] FPSCR not saved,loaded,restored for ISRs and
                    single-precision-only FPU
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org
  Target Milestone: ---
            Target: sh*-*-*

If the FPU is (potentially) used in ISRs, it should be brought into a
consistent state and should not modify the interrupted context's FPSCR state,
even if there is only a single-precision FPU (or the FPU is used as
single-precision-only) and FPU mode-switching is not done.

The test case gcc.target/sh/pragma-isr-trapa2.c fail when ran with -m2e, -m3e,
-m2a-single-only, -m4-single-only, -m4a-single-only

The other ISR related test cases seem to miss the check.


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

* [Bug c++/67641] internal error when compiling in debug mode
  2015-09-19 22:44 [Bug c++/67641] New: gcc segfaults when compiling in debug mode ryan.burn at gmail dot com
@ 2015-09-20  4:58 ` trippels at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-20  4:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67641

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |trippels at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
dup.

*** This bug has been marked as a duplicate of bug 66214 ***


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

end of thread, other threads:[~2015-09-20  4:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-19 22:44 [Bug c++/67641] New: gcc segfaults when compiling in debug mode ryan.burn at gmail dot com
2015-09-20  4:58 ` [Bug c++/67641] internal error " trippels 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).