public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code
@ 2004-05-27 13:17 hjl at lucon dot org
  2004-05-27 13:23 ` [Bug c/15666] " hjl at lucon dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-27 13:17 UTC (permalink / raw)
  To: gcc-bugs

[hjl@gnu-psc gcc]$ ./xgcc -B./ -S /tmp/foo.c -O2
/tmp/foo.c:8: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-psc gcc]$ cat /tmp/foo.c
extern __inline int
foo (const char *__s, char __reject)
{
  return __builtin_strchr (__s, __reject) != ((void *)0);
}
 
extern char *bar (__const char *__s, int __c);
extern __typeof (bar) strchr __asm__ ("bar");
[hjl@gnu-psc gcc]$ ./xgcc -B./ -S /tmp/foo.c -O2
/tmp/foo.c:8: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: [3.4 regression]: Gcc abort on valid code
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/15666] [3.4 regression]: Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
@ 2004-05-27 13:23 ` hjl at lucon dot org
  2004-05-27 13:34 ` hjl at lucon dot org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-27 13:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-26 20:06 -------
Stack backtrace

Breakpoint 3, 0xb76cd245 in abort () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb76cd245 in abort () from /lib/tls/libc.so.6
#1  0x08384498 in htab_clear_slot (htab=0xb73ed580, slot=0x0)
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/libiberty/hashtab.c:595
During symbol reading, Incomplete CFI data; unspecified registers at
0x08384493.During symbol reading, Incomplete CFI data; unspecified registers at
0x08384493.During symbol reading, Incomplete CFI data; unspecified registers at
0x08384493.During symbol reading, Incomplete CFI data; unspecified registers at
0x08384493.During symbol reading, Incomplete CFI data; unspecified registers at
0x08384493.#2  0x0831c671 in cgraph_remove_node (node=0xb73ef5e8)
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/cgraph.c:245
During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831c655.#3  0x0831e5cc in cgraph_remove_unreachable_nodes ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/cgraphunit.c:876
During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.During symbol reading, Incomplete CFI data; unspecified registers at
0x0831e5a0.#4  0x0831f8c5 in cgraph_decide_inlining ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/cgraphunit.c:1402
During symbol reading, Incomplete CFI data; unspecified registers at
0x0831f8f4.#5  0x0831fe9e in cgraph_optimize ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/cgraphunit.c:1595
#6  0x080951c3 in c_objc_common_finish_file ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/c-objc-common.c:245
#7  0x08050513 in finish_file ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/c-lang.c:185
#8  0x0808c87f in c_common_parse_file (set_yydebug=0)
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/c-opts.c:1242
#9  0x082d91fb in compile_file ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/toplev.c:1822
#10 0x082dd833 in do_compile ()
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/toplev.c:4650
#11 0x082dd8c8 in toplev_main (argc=13, argv=0xbfffb2f4)
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/toplev.c:4690
---Type <return> to continue, or q <return> to quit---
#12 0x080a94aa in main (argc=13, argv=0xbfffb2f4)
    at /net/gnu/export/gnu/src/gcc-3.4-import/gcc/gcc/main.c:35
(gdb)


-- 


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


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

* [Bug c/15666] [3.4 regression]: Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
  2004-05-27 13:23 ` [Bug c/15666] " hjl at lucon dot org
@ 2004-05-27 13:34 ` hjl at lucon dot org
  2004-05-27 15:39 ` pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-27 13:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-26 20:12 -------
It looks like this patch

http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01854.html

may be the cause.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com
         AssignedTo|unassigned at gcc dot gnu   |jh at suse dot cz
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


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


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

* [Bug c/15666] [3.4 regression]: Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
  2004-05-27 13:23 ` [Bug c/15666] " hjl at lucon dot org
  2004-05-27 13:34 ` hjl at lucon dot org
@ 2004-05-27 15:39 ` pinskia at gcc dot gnu dot org
  2004-05-29  8:29 ` [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-27 15:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
      Known to work|                            |3.4.0 3.5.0
   Target Milestone|---                         |3.4.1


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (2 preceding siblings ...)
  2004-05-27 15:39 ` pinskia at gcc dot gnu dot org
@ 2004-05-29  8:29 ` pinskia at gcc dot gnu dot org
  2004-05-29 12:33 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-29  8:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-28 19:39 -------
I should note that version.c never was able to compile with 3.4.0 either, see PR 15702 which I can 
confirm in a released version of 3.4.0.

-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (3 preceding siblings ...)
  2004-05-29  8:29 ` [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
@ 2004-05-29 12:33 ` pinskia at gcc dot gnu dot org
  2004-05-29 13:32 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-29 12:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-28 20:15 -------
*** Bug 15702 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jkillius at arcor dot de


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (4 preceding siblings ...)
  2004-05-29 12:33 ` pinskia at gcc dot gnu dot org
@ 2004-05-29 13:32 ` pinskia at gcc dot gnu dot org
  2004-05-31  1:26 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-29 13:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-28 20:17 -------
Oh, I must have messed up when testing it for 3.4.0 because I can confirm this in 3.4.0 so it was is not 
related to that patch at all.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.0
      Known to work|3.4.0 3.5.0                 |3.5.0


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (5 preceding siblings ...)
  2004-05-29 13:32 ` pinskia at gcc dot gnu dot org
@ 2004-05-31  1:26 ` pinskia at gcc dot gnu dot org
  2004-05-31  7:16 ` hjl at lucon dot org
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31  1:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-30 02:01 -------
*** Bug 15728 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ilya at theIlya dot com


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (6 preceding siblings ...)
  2004-05-31  1:26 ` pinskia at gcc dot gnu dot org
@ 2004-05-31  7:16 ` hjl at lucon dot org
  2004-05-31 13:15 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-31  7:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-30 05:44 -------
The real fixes are

http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01096.html

and the related patches. The problem is stated in Zack's post,
"using DECL_ASSEMBLER_NAME for a key in cgraph." It doesn't
work with the testcase. Should we backport Zack's patch to 3.4?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|hubicka at gcc dot gnu dot  |zack at codesourcery dot com
                   |org                         |


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (7 preceding siblings ...)
  2004-05-31  7:16 ` hjl at lucon dot org
@ 2004-05-31 13:15 ` pinskia at gcc dot gnu dot org
  2004-05-31 21:04 ` zack at codesourcery dot com
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-31 13:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-30 13:07 -------
I will note you will need the following followup patches by me if we go the route of Zack's patch:
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01904.html
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01600.html
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01263.html
And one more for i686 which I cannot find at this moment.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (8 preceding siblings ...)
  2004-05-31 13:15 ` pinskia at gcc dot gnu dot org
@ 2004-05-31 21:04 ` zack at codesourcery dot com
  2004-05-31 21:50 ` hjl at lucon dot org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: zack at codesourcery dot com @ 2004-05-31 21:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at codesourcery dot com  2004-05-30 21:10 -------
Subject: Re:  [3.4 regression] [unit-at-a-time] Gcc
 abort on valid code


I do not think it is safe to backport my patches to 3.4.  We would
have to bring in the entire c-decl.c rewrite for it to work at all,
and we haven't finished flushing out all the bugs it exposed.

I cannot evaluate the patch attached to this bug.  As usual you have
forgotten to explain in detail what is going wrong and why the patch
helps.  Also, embedding a test case in the buggy source file does not
help.  Put it in the test suite where it belongs, and just mention the
PR number in the comments.

zw


-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (9 preceding siblings ...)
  2004-05-31 21:04 ` zack at codesourcery dot com
@ 2004-05-31 21:50 ` hjl at lucon dot org
  2004-05-31 21:54 ` zack at codesourcery dot com
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-31 21:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-31 05:18 -------
The problem is "using DECL_ASSEMBLER_NAME for a key in cgraph."
DECL_ASSEMBLER_NAME can change after a node is inserted, as it
is shown in the testcase. When it happens, htab_find_slot_with_hash
is called with a different hash value than the one was used in
cgraph_node when the node was added. As the result, htab_find_slot_with_hash
returns NULL and htab_clear_slot aborts.


-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (10 preceding siblings ...)
  2004-05-31 21:50 ` hjl at lucon dot org
@ 2004-05-31 21:54 ` zack at codesourcery dot com
  2004-05-31 21:56 ` hjl at lucon dot org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: zack at codesourcery dot com @ 2004-05-31 21:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at codesourcery dot com  2004-05-31 05:40 -------
Subject: Re:  [3.4 regression] [unit-at-a-time] Gcc
 abort on valid code


Could you please be more specific?

zw


-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (11 preceding siblings ...)
  2004-05-31 21:54 ` zack at codesourcery dot com
@ 2004-05-31 21:56 ` hjl at lucon dot org
  2004-05-31 21:57 ` zack at codesourcery dot com
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-31 21:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-31 05:56 -------
Starting program: /export/build/gnu/gcc-3.4/build-pentium4-linux/gcc/cc1 -
fpreprocessed foo.i -quiet -dumpbase foo.i -mtune=pentiumpro -auxbase foo -O2 -
version -o foo.s
GNU C version 3.4.1 20040529 (prerelease) (i686-pc-linux-gnu)
        compiled by GNU C version 3.4.1 20040529 (prerelease).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=62888

Breakpoint 1, cgraph_node (decl=0xb766dd80)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/cgraph.c:101
101       if (TREE_CODE (decl) != FUNCTION_DECL)
 <function_decl 0xb766dd80 __builtin_strchr
    type <function_type 0xb766b948
        type <pointer_type 0xb76a3ec4 type <integer_type 0xb769c360 char>
            unsigned SI
            size <integer_cst 0xb769a7d0 constant 32>
            unit size <integer_cst 0xb769a820 constant 4>
            align 32 symtab 0 alias set -1>
        DI
        size <integer_cst 0xb769a5a0 constant 64>
        unit size <integer_cst 0xb769a794 constant 8>
        align 64 symtab 0 alias set -1
        attributes <tree_list 0xb7668c58
            purpose <identifier_node 0xb76873c0 nonnull>
            value <tree_list 0xb768b780
                value <integer_cst 0xb768b76c constant 1>>>
        arg-types <tree_list 0xb7684b18 value <pointer_type 0xb7686bd0>
            chain <tree_list 0xb7684b04 value <integer_type 0xb769c4a4 int>
                chain <tree_list 0xb768467c value <void_type 0xb76a3870 
void>>>>
        pointer_to_this <pointer_type 0xb75f057c>>
    used nothrow public external built-in QI file <internal> line 0
    built-in BUILT_IN_NORMAL:BUILT_IN_STRCHR context <translation_unit_decl 
0xb769c144> attributes <tree_list 0xb766e0b4>
    (mem:QI (symbol_ref:SI ("strchr") [flags 0x41] <function_decl 0xb766dd80 
__builtin_strchr>) [0 S1 A8]) chain <function_decl 0xb766de58 strchr>>
(gdb) bt
#0  cgraph_node (decl=0xb766dd80)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/cgraph.c:101
#1  0x082a6d48 in cgraph_rtl_info (decl=0xb766dd80)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/cgraph.c:364
#2  0x080a9468 in flags_from_decl_or_type (exp=0xb766dd80)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/calls.c:706
#3  0x080a94ee in call_expr_flags (t=0xb76a12b8)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/calls.c:763
#4  0x08272012 in build (code=CALL_EXPR, tt=0x1e)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/tree.c:2391
#5  0x0806865a in build_function_call (function=0xb7657e4c, params=0xb7657e24)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/c-typeck.c:1762
#6  0x0804c0b6 in yyparse () at c-parse.y:642
#7  0x0804f9bb in c_parse_file () at c-parse.y:3028
#8  0x0807e969 in c_common_parse_file (set_yydebug=30)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/c-opts.c:1237
#9  0x0826eaad in toplev_main (argc=30, argv=0xbfffdcbc)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/toplev.c:1822
#10 0x0809821e in main (argc=30, argv=0x1e)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/main.c:35
(gdb) call decl_assembler_name (decl)
$1 = (union tree_node *) 0xb766c880
(gdb) call debug_tree(0xb766c880)
 <identifier_node 0xb766c880 strchr
    symbol <function_decl 0xb766de58 strchr
        type <function_type 0xb766b948 type <pointer_type 0xb76a3ec4>
            DI
            size <integer_cst 0xb769a5a0 constant 64>
            unit size <integer_cst 0xb769a794 constant 8>
            align 64 symtab 0 alias set -1
            attributes <tree_list 0xb7668c58
                purpose <identifier_node 0xb76873c0 nonnull>
                value <tree_list 0xb768b780
                    value <integer_cst 0xb768b76c constant 1>>>
            arg-types <tree_list 0xb7684b18 value <pointer_type 0xb7686bd0>
                chain <tree_list 0xb7684b04 value <integer_type 0xb769c4a4 int>
                    chain <tree_list 0xb768467c value <void_type 0xb76a3870 
void>>>>
            pointer_to_this <pointer_type 0xb75f057c>>
        nothrow public external built-in decl_3 QI file <internal> line 0
        built-in BUILT_IN_NORMAL:BUILT_IN_STRCHR context 
<translation_unit_decl 0xb769c144> attributes <tree_list 0xb766e0f0>
        (mem:QI (symbol_ref:SI ("strchr") [flags 0x41] <function_decl 
0xb766de58 strchr>) [0 S1 A8])
        chain <function_decl 0xb766df30 __builtin_strcmp type <function_type 
0xb767006c>
            nothrow public external built-in QI file <internal> line 0
            built-in BUILT_IN_NORMAL:BUILT_IN_STRCMP context 
<translation_unit_decl 0xb769c144> attributes <tree_list 0xb766e140>
            (mem:QI (symbol_ref:SI ("strcmp") [flags 0x41] <function_decl 
0xb766df30 __builtin_strcmp>) [0 S1 A8]) chain <function_decl 0xb76700d8 
strcmp>>>>
(gdb) c
Continuing.

Breakpoint 2, cgraph_remove_node (node=0xb75f05e8)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/cgraph.c:218
218         cgraph_remove_edge (node->callers->caller, node);
 <function_decl 0xb766dd80 __builtin_strchr
    type <function_type 0xb766b948
        type <pointer_type 0xb76a3ec4 type <integer_type 0xb769c360 char>
            unsigned SI
            size <integer_cst 0xb769a7d0 constant 32>
            unit size <integer_cst 0xb769a820 constant 4>
            align 32 symtab 0 alias set -1>
        DI
        size <integer_cst 0xb769a5a0 constant 64>
        unit size <integer_cst 0xb769a794 constant 8>
        align 64 symtab 0 alias set -1
        attributes <tree_list 0xb7668c58
            purpose <identifier_node 0xb76873c0 nonnull>
            value <tree_list 0xb768b780
                value <integer_cst 0xb768b76c constant 1>>>
        arg-types <tree_list 0xb7684b18 value <pointer_type 0xb7686bd0>
            chain <tree_list 0xb7684b04 value <integer_type 0xb769c4a4 int>
                chain <tree_list 0xb768467c value <void_type 0xb76a3870 
void>>>>
        pointer_to_this <pointer_type 0xb75f057c>>
    used nothrow public external built-in QI file <internal> line 0
    built-in BUILT_IN_NORMAL:BUILT_IN_STRCHR context <translation_unit_decl 
0xb769c144> attributes <tree_list 0xb766e0b4> chain <function_decl 0xb766de58 
strchr>>
(gdb) bt
#0  cgraph_remove_node (node=0xb75f05e8)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/cgraph.c:218
#1  0x082a8f38 in cgraph_optimize ()
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/cgraphunit.c:892
#2  0x08086374 in c_objc_common_finish_file ()
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/c-objc-common.c:245
#3  0x0826eaad in toplev_main (argc=0, argv=0xbffffcbc)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/toplev.c:1822
#4  0x0809821e in main (argc=0, argv=0x0)
    at /net/gnu/export/gnu/src/gcc-3.4/gcc/gcc/main.c:35
(gdb) call decl_assembler_name (node->decl)
$2 = (union tree_node *) 0xb75ee680
(gdb) call debug_tree(0xb75ee680)
 <identifier_node 0xb75ee680 *bar>
(gdb) next
220         cgraph_remove_edge (node, node->callees->callee);
(gdb)
222         cgraph_remove_node (node->nested);
(gdb)
223       if (node->origin)
(gdb)
231       if (node->previous)
(gdb)
234         cgraph_nodes = node->next;
(gdb)
235       if (node->next)
(gdb)
237       DECL_SAVED_TREE (node->decl) = NULL;
(gdb)
238       DECL_SAVED_INSNS (node->decl) = NULL;
(gdb)
239       DECL_ARGUMENTS (node->decl) = NULL;
(gdb)
240       DECL_INITIAL (node->decl) = error_mark_node;
(gdb)
241       slot =
(gdb)
245       if (slot == 0)
(gdb) p slot
$3 = (void **) 0x0
(gdb)





-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (12 preceding siblings ...)
  2004-05-31 21:56 ` hjl at lucon dot org
@ 2004-05-31 21:57 ` zack at codesourcery dot com
  2004-05-31 23:33 ` hjl at lucon dot org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: zack at codesourcery dot com @ 2004-05-31 21:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at codesourcery dot com  2004-05-31 06:02 -------
Subject: Re:  [3.4 regression] [unit-at-a-time] Gcc
 abort on valid code


That's a nice debugging session; now please explain in detail what it
means.  Please do not assume that I know anything.

zw


-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (13 preceding siblings ...)
  2004-05-31 21:57 ` zack at codesourcery dot com
@ 2004-05-31 23:33 ` hjl at lucon dot org
  2004-05-31 23:42 ` zack at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl at lucon dot org @ 2004-05-31 23:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hjl at lucon dot org  2004-05-31 15:11 -------
IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME (decl)) is used
to compute hash value and DECL_ASSEMBLER_NAME is defined as

#define DECL_ASSEMBLER_NAME(NODE) decl_assembler_name (NODE)

When DECL 0xb766dd80 is added in cgraph_node, its
DECL_ASSEMBLER_NAME is 0xb766c880. But when it is removed
in cgraph_remove_node, its DECL_ASSEMBLER_NAME is
0xb75ee680. They have different hash values. It is due to

extern __typeof (bar) strchr __asm__ ("bar");

As the result, cgraph_remove_node can't find the slot since
the wrong hash value is used.


-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (14 preceding siblings ...)
  2004-05-31 23:33 ` hjl at lucon dot org
@ 2004-05-31 23:42 ` zack at gcc dot gnu dot org
  2004-06-01 11:11 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: zack at gcc dot gnu dot org @ 2004-05-31 23:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zack at gcc dot gnu dot org  2004-05-31 15:29 -------
I see how it's going off the rails now.  Next two questions:  Why do
__builtin_strchr and strchr have the same DECL node?  Why does __builtin_strchr
have its DECL_ASSEMBLER_NAME instantiated to begin with?

-- 


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (15 preceding siblings ...)
  2004-05-31 23:42 ` zack at gcc dot gnu dot org
@ 2004-06-01 11:11 ` pinskia at gcc dot gnu dot org
  2004-06-03  4:44 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-01 11:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-01 11:11 -------
*** Bug 15762 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bero at arklinux dot org


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (16 preceding siblings ...)
  2004-06-01 11:11 ` pinskia at gcc dot gnu dot org
@ 2004-06-03  4:44 ` pinskia at gcc dot gnu dot org
  2004-06-04  2:47 ` pinskia at gcc dot gnu dot org
  2004-06-07 19:07 ` cvs-commit at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-03  4:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-03 04:44 -------
Fixed.

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


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (17 preceding siblings ...)
  2004-06-03  4:44 ` pinskia at gcc dot gnu dot org
@ 2004-06-04  2:47 ` pinskia at gcc dot gnu dot org
  2004-06-07 19:07 ` cvs-commit at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-04  2:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-04 02:47 -------
*** Bug 15691 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlosev at newipnet dot com


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


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

* [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] Gcc abort on valid code
  2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
                   ` (18 preceding siblings ...)
  2004-06-04  2:47 ` pinskia at gcc dot gnu dot org
@ 2004-06-07 19:07 ` cvs-commit at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-07 19:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-07 19:06 -------
Subject: Bug 15666

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	aoliva@gcc.gnu.org	2004-06-07 19:06:33

Modified files:
	gcc            : ChangeLog c-decl.c 

Log message:
	PR middle-end/15666
	* c-decl.c (finish_decl): Use change_decl_assembler_name for the
	builtin decl as well.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3864&r2=2.3865
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.505&r2=1.506



-- 


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


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

end of thread, other threads:[~2004-06-07 19:07 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-27 13:17 [Bug c/15666] New: [3.4 regression]: Gcc abort on valid code hjl at lucon dot org
2004-05-27 13:23 ` [Bug c/15666] " hjl at lucon dot org
2004-05-27 13:34 ` hjl at lucon dot org
2004-05-27 15:39 ` pinskia at gcc dot gnu dot org
2004-05-29  8:29 ` [Bug middle-end/15666] [3.4 regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
2004-05-29 12:33 ` pinskia at gcc dot gnu dot org
2004-05-29 13:32 ` pinskia at gcc dot gnu dot org
2004-05-31  1:26 ` pinskia at gcc dot gnu dot org
2004-05-31  7:16 ` hjl at lucon dot org
2004-05-31 13:15 ` pinskia at gcc dot gnu dot org
2004-05-31 21:04 ` zack at codesourcery dot com
2004-05-31 21:50 ` hjl at lucon dot org
2004-05-31 21:54 ` zack at codesourcery dot com
2004-05-31 21:56 ` hjl at lucon dot org
2004-05-31 21:57 ` zack at codesourcery dot com
2004-05-31 23:33 ` hjl at lucon dot org
2004-05-31 23:42 ` zack at gcc dot gnu dot org
2004-06-01 11:11 ` pinskia at gcc dot gnu dot org
2004-06-03  4:44 ` pinskia at gcc dot gnu dot org
2004-06-04  2:47 ` pinskia at gcc dot gnu dot org
2004-06-07 19:07 ` cvs-commit 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).