public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug plugins/65817] New: libcc1: ICE: SEGV: c_incomplete_type_error()
@ 2015-04-20 18:33 jan.kratochvil at redhat dot com
  2015-04-20 18:38 ` [Bug plugins/65817] " jan.kratochvil at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-04-20 18:33 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5932 bytes --]

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

            Bug ID: 65817
           Summary: libcc1: ICE: SEGV: c_incomplete_type_error()
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: plugins
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.kratochvil at redhat dot com
                CC: pmuldoon at redhat dot com
              Host: x86_64-linux-gnu
            Target: x86_64-linux-gnu

r222230

Current libcc1 uses just: make_node (RECORD_TYPE)
which crashes on:
      if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
as TYPE_NAME (type) == NULL .

Actual:
*** WARNING *** there are active plugins, do not report this as a bug unless
you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_PRE_GENERICIZE            | libcc1plugin
PLUGIN_GGC_MARKING               | libcc1plugin
PLUGIN_PRAGMAS                   | libcc1plugin
gdb command line:1:1: internal compiler error: Segmentation fault
0xb1c4af crash_signal
        ../../gccgitatsign/gcc/toplev.c:383
0x618794 c_incomplete_type_error(tree_node const*, tree_node const*)
        ../../gccgitatsign/gcc/c/c-typeck.c:282
0x623750 c_incomplete_type_error(tree_node const*, tree_node const*)
        ../../gccgitatsign/gcc/c/c-typeck.c:235
0x623750 build_component_ref(unsigned int, tree_node*, tree_node*)
        ../../gccgitatsign/gcc/c/c-typeck.c:2304
0x654fb3 c_parser_postfix_expression_after_primary
        ../../gccgitatsign/gcc/c/c-parser.c:7925
0x6478f6 c_parser_postfix_expression
        ../../gccgitatsign/gcc/c/c-parser.c:7715
0x649f5a c_parser_unary_expression
        ../../gccgitatsign/gcc/c/c-parser.c:6602
0x65122f c_parser_cast_expression
        ../../gccgitatsign/gcc/c/c-parser.c:6440
0x651412 c_parser_binary_expression
        ../../gccgitatsign/gcc/c/c-parser.c:6255
0x651f75 c_parser_conditional_expression
        ../../gccgitatsign/gcc/c/c-parser.c:6031
0x652560 c_parser_expr_no_commas
        ../../gccgitatsign/gcc/c/c-parser.c:5949

0x652c52 c_parser_expression
        ../../gccgitatsign/gcc/c/c-parser.c:8022
0x653689 c_parser_expression_conv
        ../../gccgitatsign/gcc/c/c-parser.c:8055
0x661978 c_parser_statement_after_labels
        ../../gccgitatsign/gcc/c/c-parser.c:5115
0x663173 c_parser_compound_statement_nostart
        ../../gccgitatsign/gcc/c/c-parser.c:4701
0x66399e c_parser_compound_statement
        ../../gccgitatsign/gcc/c/c-parser.c:4538
0x661a67 c_parser_statement_after_labels
        ../../gccgitatsign/gcc/c/c-parser.c:4964
0x663173 c_parser_compound_statement_nostart
        ../../gccgitatsign/gcc/c/c-parser.c:4701
0x66399e c_parser_compound_statement
        ../../gccgitatsign/gcc/c/c-parser.c:4538
0x65fc80 c_parser_declaration_or_fndef
        ../../gccgitatsign/gcc/c/c-parser.c:1982
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.
Compilation failed.

Expected:
gdb command line:1:1: error: invalid use of incomplete typedef ‘({anonymous})’

1586c8fbaf0116931ffacd1746a6540c81c2d438 GDB commit
>From gcc-bugs-return-484103-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Apr 20 18:35:23 2015
Return-Path: <gcc-bugs-return-484103-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 36529 invoked by alias); 20 Apr 2015 18:35:23 -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 36496 invoked by uid 48); 20 Apr 2015 18:35:19 -0000
From: "jan.kratochvil at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug plugins/65817] libcc1: ICE: SEGV: c_incomplete_type_error()
Date: Mon, 20 Apr 2015 18:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: plugins
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jan.kratochvil at redhat dot com
X-Bugzilla-Status: UNCONFIRMED
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: attachments.created
Message-ID: <bug-65817-4-QaTuslAfls@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65817-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65817-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-04/txt/msg01655.txt.bz2
Content-length: 786

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

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Created attachment 35368
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id5368&actioníit
GDB patch

GDB patch to crash GCC.

together with:
cat >1.c <<EOH
// b tree.c:build_qualified_type
// p TYPE_SIZE (type)
volatile struct sv { volatile struct sv *p; } sv; // CRASH: compile code sv.p &sv;
volatile struct s { int i; } s, *sp; // OK: compile code sp = &s;
int main(void) { return 0; }
EOH
gcc -o 1 1.c -Wall -g;noGDBHOOK=1
PATH="/home/jkratoch/redhat/gccgitatsign-root/bin:$PATH"
LD_LIBRARY_PATH=/home/jkratoch/redhat/gccgitatsign-root/lib64 ../gdb ./1 -ex
start -ex 'set debug compile 0' -ex 'compile code sv.p = &sv;printf("%p
%p\n",&sv,sv.p);'


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

end of thread, other threads:[~2022-01-09 22:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 18:33 [Bug plugins/65817] New: libcc1: ICE: SEGV: c_incomplete_type_error() jan.kratochvil at redhat dot com
2015-04-20 18:38 ` [Bug plugins/65817] " jan.kratochvil at redhat dot com
2021-01-24 20:15 ` tromey at gcc dot gnu.org
2022-01-09 22:35 ` [Bug libcc1/65817] " tromey 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).