This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix middle-end/19515


Richard Henderson wrote:
> The solution is about what I mentioned in the PR.  At each step, see
> if we've got an incompletely initialized union, and if so, force the
> entire object to be zeroed.  Not spectacularly efficient, but continues
> to avoid the quadratic match-up-the-initializer-with-the-structure
> problem, which we should still solve at some point.  But not now.

I'm seeing a bootstrap failure (i686-pc-linux-gnu). Not
completely sure that it's caused by your patch per se, but
the faulting code is what is touched by your patch:

(gdb) r
Starting program: /extra/src/gcc/build/gcc/cc1plus -quiet -nostdinc++
-I/extra/src/gcc/build/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu
-I/extra/src/gcc/build/i686-pc-linux-gnu/libstdc++-v3/include
-I/extra/src/gcc/gcc-20050129/libstdc++-v3/libsupc++ -iprefix
/extra/src/gcc/build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.0/ -isystem
/extra/src/gcc/build/gcc/include -D_GNU_SOURCE -D_GNU_SOURCE -DPIC
-isystem /extra/lgcc/i686-pc-linux-gnu/include -isystem
/extra/lgcc/i686-pc-linux-gnu/sys-include
/extra/src/gcc/gcc-20050129/libstdc++-v3/src/bitmap_allocator.cc -quiet
-dumpbase bitmap_allocator.cc -mtune=pentiumpro -auxbase-strip
.libs/bitmap_allocator.o -g -O2 -Wall -Wextra -Wwrite-strings
-Wcast-qual -fno-implicit-templates -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -fPIC -o /tmp/ccdeDt9o.s

Program received signal SIGSEGV, Segmentation fault.
0x081c77d3 in categorize_ctor_elements_1 (ctor=0xb77c8cc0,
    p_nz_elts=0xbfffe890, p_nc_elts=0xbfffe88c, p_elt_count=0xbfffe888,
    p_must_clear=0xbfffe897 "") at
/extra/src/gcc/gcc-20050129/gcc/expr.c:4373
4373          init_sub_type = TREE_TYPE (TREE_VALUE (list));
(gdb) bt
#0  0x081c77d3 in categorize_ctor_elements_1 (ctor=0xb77c8cc0,
    p_nz_elts=0xbfffe890, p_nc_elts=0xbfffe88c, p_elt_count=0xbfffe888,
    p_must_clear=0xbfffe897 "") at
/extra/src/gcc/gcc-20050129/gcc/expr.c:4373
#1  0x081c78d8 in mostly_zeros_p (exp=0xb77c8cc0)
    at /extra/src/gcc/gcc-20050129/gcc/expr.c:4500
#2  0x081cb0b0 in expand_expr_real_1 (exp=Variable "exp" is not available.
)
    at /extra/src/gcc/gcc-20050129/gcc/expr.c:6731
#3  0x081cdbfe in expand_expr_real (exp=0xb77c8cc0, target=0xb77ea654,
    tmode=BLKmode, modifier=EXPAND_NORMAL, alt_rtl=0xbfffe9f8)
    at /extra/src/gcc/gcc-20050129/gcc/expr.c:6342
#4  0x081d2308 in store_expr (exp=0xb77c8cc0, target=0xb77ea654,
    call_param_p=0) at /extra/src/gcc/gcc-20050129/gcc/expr.c:4105
#5  0x081d3ade in expand_assignment (to=0xb77ce948, from=0xc)
    at /extra/src/gcc/gcc-20050129/gcc/expr.c:3984
#6  0x081ca5c7 in expand_expr_real_1 (exp=Variable "exp" is not available.
)
    at /extra/src/gcc/gcc-20050129/gcc/expr.c:8120
#7  0x081cdad3 in expand_expr_real (exp=0xb77ca6c0, target=0xb7dc9210,
    tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /extra/src/gcc/gcc-20050129/gcc/expr.c:6336
#8  0x08326b56 in expand_expr_stmt (exp=0xb77ca6c0) at expr.h:482
#9  0x0834a93c in tree_expand_cfg ()
    at /extra/src/gcc/gcc-20050129/gcc/cfgexpand.c:1133
#10 0x0810513d in execute_pass_list (pass=0x849d240)
---Type <return> to continue, or q <return> to quit---
    at /extra/src/gcc/gcc-20050129/gcc/tree-optimize.c:528
#11 0x08105412 in tree_rest_of_compilation (fndecl=0xb79de9b4)
    at /extra/src/gcc/gcc-20050129/gcc/tree-optimize.c:664
#12 0x080b822c in expand_body (fn=0xb79de9b4)
    at /extra/src/gcc/gcc-20050129/gcc/cp/semantics.c:2986
#13 0x0836a2cd in cgraph_expand_function (node=0xb79e6144)
    at /extra/src/gcc/gcc-20050129/gcc/cgraphunit.c:822
#14 0x0836ad22 in cgraph_optimize ()
    at /extra/src/gcc/gcc-20050129/gcc/cgraphunit.c:1689
#15 0x08087e7a in cp_finish_file ()
    at /extra/src/gcc/gcc-20050129/gcc/cp/decl2.c:3072
#16 0x080ef66a in c_common_parse_file (set_yydebug=0)
    at /extra/src/gcc/gcc-20050129/gcc/c-opts.c:1091
#17 0x0832eb20 in toplev_main (argc=0, argv=0xbfffef34)
    at /extra/src/gcc/gcc-20050129/gcc/toplev.c:996
#18 0xb7edb20f in __libc_start_main () from /lib/libc.so.6
#19 0x080498f1 in _start () at ../sysdeps/i386/elf/start.S:119
(gdb) p list
$1 = 0x0
(gdb) p ctor
$2 = 0xb77c8cc0
(gdb) p debug_tree(ctor)
 <constructor 0xb77c8cc0
    type <union_type 0xb7c4eec4 __gthread_mutex_t asm_written type_1
type_5 BLK
        size <integer_cst 0xb7dc6b28 constant invariant 192>
        unit size <integer_cst 0xb7dc6b40 constant invariant 24>
        align 32 symtab -1212013812 alias set -1
        fields <field_decl 0xb7c0621c __data type <record_type
0xb7c05d80 ._5>
            in_system_header nonlocal decl_3 BLK file
/usr/include/bits/pthreadtypes.h line 60 size <integer_cst 0xb7dc6b28
192> unit size <integer_cst 0xb7dc6b40 24>
            align 32 offset_align 128
            offset <integer_cst 0xb7dc61b0 constant invariant 0>
            bit offset <integer_cst 0xb7dc6978 constant invariant 0>
context <union_type 0xb7c05af8 pthread_mutex_t> arguments <integer_cst
0xb7dc61b0 0> chain<field_decl 0xb7c06360 __size>>
        X() X(constX&) this=(X&)
        pointer_to_this <pointer_type 0xb7c524a4> chain <type_decl
0xb7c05bd0 ._4>>
    constant invariant static>
$3 = void

Thanks,
Ranjit.

PS: It's a Linux 2.6.10 system with glibc 2.3.4 using 2.6.10
kernel headers compiled using gcc 3.4.3. All of these were
built from "original", unpatched, sources.

-- 
Ranjit Mathew       Email: rmathew AT gmail DOT com

Bangalore, INDIA.     Web: http://ranjitmathew.hostingzero.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]