public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE
@ 2011-03-16 16:33 ktietz at gcc dot gnu.org
  2011-03-16 16:40 ` [Bug middle-end/48152] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-03-16 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Bootstrap failure for x86_64-w64-mingw32 due ICE
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ktietz@gcc.gnu.org


Bootstrap of libstdc++ fails for building libstdc++-v3/src/istream-inst.cc.

This is caused by http://gcc.gnu.org/viewcvs?view=revision&revision=171036

$ gdb --args /home/ktietz/source/gcc-head/buildw64/./gcc/cc1plus.exe
-nostdinc++ -isystem /usr/local/x86_64-w64-mingw32/include -isystem
/usr/local/mingw/include -isystem /usr/local/x86_64-w64-mingw32/include-isystem
-I/home/ktietz/source/gcc-head/buildw64/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/home/ktietz/source/gcc-head/buildw64/x86_64-w64-mingw32/libstdc++-v3/include
-I/home/ktietz/source/gcc-head/gcc/libstdc++-v3/libsupc++
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-fdiagnostics-show-location=once-ffunction-sections -fdata-sections -g -O2
../../../../gcc/libstdc++-v3/src/istream-inst.cc  -DDLL_EXPORT -DPIC -o
istream-inst.s
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 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 "i686-pc-cygwin"...
(gdb) br fancy_abort
Breakpoint 1 at 0x824d26: file ../../gcc/gcc/diagnostic.c, line 893.
(gdb)r

backtrace of ICE:

#0  fancy_abort (file=0xfb774c "../../gcc/gcc/config/i386/i386.c", line=6897,
    function=0xfb9339 "function_arg_advance_ms_64")
    at ../../gcc/gcc/diagnostic.c:893
#1  0x00744ff0 in ix86_function_arg_advance (cum=0x369c550, mode=BLKmode,
    type=0x7e9b9600, named=1 '\001') at ../../gcc/gcc/config/i386/i386.c:6804
#2  0x00df0fc8 in vt_initialize () at ../../gcc/gcc/var-tracking.c:5787
#3  0x00df2ad9 in variable_tracking_main ()
    at ../../gcc/gcc/var-tracking.c:8939
#4  0x00816fd2 in execute_one_pass (pass=0xf4b360)
    at ../../gcc/gcc/passes.c:1556
#5  0x00817144 in execute_pass_list (pass=0xf4b0a0)
    at ../../gcc/gcc/passes.c:1611
#6  0x00817157 in execute_pass_list (pass=0xf45720)
    at ../../gcc/gcc/passes.c:1612
#7  0x00817157 in execute_pass_list (pass=0xf47ba0)
    at ../../gcc/gcc/passes.c:1612
#8  0x0099d1cd in tree_rest_of_compilation (fndecl=0x7e5a0200)
    at ../../gcc/gcc/tree-optimize.c:422
#9  0x0081a6eb in cgraph_expand_function (node=0x7e668f30)
    at ../../gcc/gcc/cgraphunit.c:1576
#10 0x0081d24d in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1635
#11 0x0081d72a in cgraph_finalize_compilation_unit ()
    at ../../gcc/gcc/cgraphunit.c:1096
#12 0x004d9ac4 in cp_write_global_declarations ()
    at ../../gcc/gcc/cp/decl2.c:4000
#13 0x0085c29d in toplev_main (argc=26, argv=0x3c696f0)
    at ../../gcc/gcc/toplev.c:591
#14 0x0062165a in main (argc=26, argv=0x3c696f0) at ../../gcc/gcc/main.c:36

The cause for this aasertation is that it is tried to call
ix86_function_arg_advance with a type/mode size of 16 bytes, which isn't
allowed by this ABI.


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
@ 2011-03-16 16:40 ` jakub at gcc dot gnu.org
  2011-03-16 17:04 ` ktietz at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-16 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-16 16:36:05 UTC ---
The interesting thing there is see with what parameters prepare_call_arguments
is called here and debug_rtx (insn) in that spot, also in which place in
prepare_call_arguments is the call to targetm.calls.function_arg_advance
that ICEs, what type it is, what mode it has, etc.


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
  2011-03-16 16:40 ` [Bug middle-end/48152] " jakub at gcc dot gnu.org
@ 2011-03-16 17:04 ` ktietz at gcc dot gnu.org
  2011-03-16 17:40 ` ktietz at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-03-16 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-03-16 16:57:39 UTC ---
dump_tree of type is:

(gdb) call dump_tree(type)
No symbol "dump_tree" in current context.
(gdb) call debug_tree(type)
 <record_type 0x7e9b9600 istreambuf_iterator asm_written needs-constructing
type
_1 type_5 type_6 BLK
    size <integer_cst 0x7eef0ba0 type <integer_type 0x7ef703c0 bit_size_type>
co
nstant 128>
    unit size <integer_cst 0x7eef0bc0 type <integer_type 0x7ef70360 long long
un
signed int> constant 16>
    align 64 symtab 2122505008 alias set 43 canonical type 0x7e9b9600
    fields <field_decl 0x7e471500 _M_sbuf
        type <pointer_type 0x7e471560 type <record_type 0x7e60fde0
streambuf_typ
e>
            asm_written public unsigned DI
            size <integer_cst 0x7eef0ae0 constant 64>
            unit size <integer_cst 0x7eef0b00 constant 8>
            align 64 symtab 2122505200 alias set -1 canonical type 0x7e9ed860>
        used private unsigned nonlocal decl_0 decl_3 DI file
/home/ktietz/source
/gcc-head/buildw64/x86_64-w64-mingw32/libstdc++-v3/include/bits/streambuf_iterat
or.h line 93 col 31 size <integer_cst 0x7eef0ae0 64> unit size <integer_cst
0x7e
9b9600 istreambuf_iterator>
        mutable
        chain <field_decl 0x7e4715c0 _M_c type <integer_type 0x7e60fd80
int_type
>
            used private nonlocal decl_0 decl_3 SI file
/home/ktietz/source/gcc-
head/buildw64/x86_64-w64-mingw32/libstdc++-v3/include/bits/streambuf_iterator.h
line 94 col 25
            size <integer_cst 0x7eef09c0 constant 32>
            unit size <integer_cst 0x7eef0760 constant 4>
            align 32 offset_align 128 offset <integer_cst 0x7eef0780 0> bit
offs
et <integer_cst 0x7eef0ae0 64> context <record_type 0x7e9b9600
istreambuf_iterat
or>
            mutable  chain <type_decl 0x7e5f6190 istreambuf_iterator>>> context
<namespace_decl 0x7edd00e0 std>
    full-name "struct std::istreambuf_iterator<char, std::char_traits<char> >"
    needs-constructor X() X(constX&) this=(X&) sorted-fields 0x7e461518
n_parent
s=1 use_template=1 interface-unknown
    pointer_to_this <pointer_type 0x7e471620> reference_to_this <reference_type
0x7e471c80> chain <type_decl 0x7e76cc50 istreambuf_iterator>>

At #2  0x00df0fc8 in vt_initialize () at ../../gcc/gcc/var-tracking.c:5787

Dump of t is:
 <tree_list 0x7e53c528
    value <record_type 0x7e9b9600 istreambuf_iterator asm_written
needs-construc
ting type_1 type_5 type_6 BLK
        size <integer_cst 0x7eef0ba0 constant 128>
        unit size <integer_cst 0x7eef0bc0 constant 16>
        align 64 symtab 2122505008 alias set 43 canonical type 0x7e9b9600
        fields <field_decl 0x7e471500 _M_sbuf type <pointer_type 0x7e471560>
            used private unsigned nonlocal decl_0 decl_3 DI file
/home/ktietz/so
urce/gcc-head/buildw64/x86_64-w64-mingw32/libstdc++-v3/include/bits/streambuf_it
erator.h line 93 col 31
            size <integer_cst 0x7eef0ae0 constant 64>
            unit size <integer_cst 0x7eef0b00 constant 8>
            align 64 offset_align 128
            offset <integer_cst 0x7eef0780 constant 0>
            bit offset <integer_cst 0x7eef0d20 constant 0> context <record_type
0x7e9b9600 istreambuf_iterator>
            mutable  chain <field_decl 0x7e4715c0 _M_c>> context
<namespace_decl
 0x7edd00e0 std>
        full-name "struct std::istreambuf_iterator<char, std::char_traits<char>
>"
        needs-constructor X() X(constX&) this=(X&) sorted-fields 0x7e461518
n_pa
rents=1 use_template=1 interface-unknown
        pointer_to_this <pointer_type 0x7e471620> reference_to_this
<reference_t
ype 0x7e471c80> chain <type_decl 0x7e76cc50 istreambuf_iterator>>
    chain <tree_list 0x7e53c510 value <record_type 0x7e9b9600
istreambuf_iterato
r>
        chain <tree_list 0x7e53c4f8 value <reference_type 0x7e91bee0>
            chain <tree_list 0x7e53c4e0 value <reference_type 0x7e79dda0>
                chain <tree_list 0x7e53c4c8 value <reference_type 0x7e753d80>
                    chain <tree_list 0x7ef90d08 value <void_type 0x7ef70ba0
void
>>>>>>>

reg has the value of NULL_RTX.

(gdb) call debug_rtx(call_arguments)
(expr_list:REG_DEP_TRUE (concat:DI (reg:DI 1 dx)
        (value/u:DI 76:76 @0x3b80c88/0x3b81730))
    (expr_list:REG_DEP_TRUE (concat:DI (reg:DI 2 cx)
            (value/u:DI 100:3633 @0x3b80ec8/0x3b8a028))
        (nil)))


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
  2011-03-16 16:40 ` [Bug middle-end/48152] " jakub at gcc dot gnu.org
  2011-03-16 17:04 ` ktietz at gcc dot gnu.org
@ 2011-03-16 17:40 ` ktietz at gcc dot gnu.org
  2011-03-16 17:43 ` nightstrike at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-03-16 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-03-16 17:25:33 UTC ---
Created attachment 23681
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23681
Preprocessed source


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-03-16 17:40 ` ktietz at gcc dot gnu.org
@ 2011-03-16 17:43 ` nightstrike at gmail dot com
  2011-03-16 19:16 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: nightstrike at gmail dot com @ 2011-03-16 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

nightstrike <nightstrike at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nightstrike at gmail dot
                   |                            |com

--- Comment #4 from nightstrike <nightstrike at gmail dot com> 2011-03-16 17:40:10 UTC ---
Please update host field to show that this only affects a host/target
combination of 32/win64.  For instance, it fails on our buildslaves that are
darwin32 and linux32 cross compilers to win64, but none other.


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-03-16 17:43 ` nightstrike at gmail dot com
@ 2011-03-16 19:16 ` jakub at gcc dot gnu.org
  2011-03-16 20:02 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-16 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-16 18:49:54 UTC ---
Reproduced with:

struct A
{
  A ();
  ~A ();
  char buf[16];
  virtual void bar (int, A, int);
};

void
foo (A *p)
{
  A a;
  p->bar (6, a, 7);
}

using x86_64-linux -> x86_64-mingw32 cross and -O2 -g.
Apparently TYPE_ARG_TYPES contains the original source types rather than how it
is actually passed by invisible reference, will need to figure out where
expand_call adjusts this and do something similar in prepare_call_arguments.


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-03-16 19:16 ` jakub at gcc dot gnu.org
@ 2011-03-16 20:02 ` jakub at gcc dot gnu.org
  2011-03-17 15:22 ` jakub at gcc dot gnu.org
  2011-03-17 16:08 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-16 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-16 19:16:21 UTC ---
Created attachment 23682
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23682
gcc47-pr48152.patch

Untested fix.


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-03-16 20:02 ` jakub at gcc dot gnu.org
@ 2011-03-17 15:22 ` jakub at gcc dot gnu.org
  2011-03-17 16:08 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-17 15:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-17 15:21:43 UTC ---
Author: jakub
Date: Thu Mar 17 15:21:39 2011
New Revision: 171101

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171101
Log:
    PR middle-end/48152
    * var-tracking.c (prepare_call_arguments): If argument needs to be
    passed by reference, adjust argtype and mode.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/var-tracking.c


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

* [Bug middle-end/48152] Bootstrap failure for x86_64-w64-mingw32 due ICE
  2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-03-17 15:22 ` jakub at gcc dot gnu.org
@ 2011-03-17 16:08 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-17 16:08 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-17 16:06:54 UTC ---
Fixed.


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

end of thread, other threads:[~2011-03-17 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16 16:33 [Bug middle-end/48152] New: Bootstrap failure for x86_64-w64-mingw32 due ICE ktietz at gcc dot gnu.org
2011-03-16 16:40 ` [Bug middle-end/48152] " jakub at gcc dot gnu.org
2011-03-16 17:04 ` ktietz at gcc dot gnu.org
2011-03-16 17:40 ` ktietz at gcc dot gnu.org
2011-03-16 17:43 ` nightstrike at gmail dot com
2011-03-16 19:16 ` jakub at gcc dot gnu.org
2011-03-16 20:02 ` jakub at gcc dot gnu.org
2011-03-17 15:22 ` jakub at gcc dot gnu.org
2011-03-17 16:08 ` jakub 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).