public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5
@ 2011-01-18  9:22 daniel.f.starke at freenet dot de
  2011-01-18 12:44 ` [Bug c++/47338] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: daniel.f.starke at freenet dot de @ 2011-01-18  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.5 Regression][C++] cc1plus returns exist code 5
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.f.starke@freenet.de
              Host: mingw32
            Target: mingw32
             Build: mingw32


Created attachment 23015
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23015
preprocessed test file .ii

When compiling the attatched code cc1plus returns exit code 5. No warning or
error message is shown. It compiles fine with the same host/target/build and
gcc 4.4.0.

Command:
$ g++ -pass-exit-codes -o XmlResultReader.o -c XmlResultReader.cpp -v
-save-temps || echo "error: $?"
Using built-in specs.
COLLECT_GCC=D:\Programme\msys\mingw\bin\g++.exe
COLLECT_LTO_WRAPPER=d:/programme/msys/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --disable-bootstrap
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --disable-nls
--disable-shared --enable-static --enable-libgcj --enable-libgomp --enable-lto
--with-dwarf2 --disable-win32-registry --enable-version-specific-runtime-libs
--prefix=/mingw --build=mingw32 --enable-abi=32
Thread model: win32
gcc version 4.5.2 (GCC) 
COLLECT_GCC_OPTIONS='-o' 'XmlResultReader.o' '-c' '-v' '-save-temps'
'-mtune=i386' '-march=i386'
 d:/programme/msys/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe -E -quiet
-v -iprefix d:\programme\msys\mingw\bin\../lib/gcc/mingw32/4.5.2/
XmlResultReader.cpp -mtune=i386 -march=i386 -fpch-preprocess -o
XmlResultReader.ii
ignoring duplicate directory
"d:/programme/msys/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include/c++"
ignoring duplicate directory
"d:/programme/msys/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include/c++/mingw32"
ignoring duplicate directory
"d:/programme/msys/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include/c++/backward"
ignoring nonexistent directory "/mingw/include"
ignoring duplicate directory
"d:/programme/msys/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include"
ignoring duplicate directory
"d:/programme/msys/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include-fixed"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 d:\programme\msys\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++
 d:\programme\msys\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/mingw32
 d:\programme\msys\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/backward
 d:\programme\msys\mingw\bin\../lib/gcc/mingw32/4.5.2/include
 d:\programme\msys\mingw\bin\../lib/gcc/mingw32/4.5.2/include-fixed
 D:/Programme/msys/mingw/include
 d:/programme/msys/mingw/lib/gcc/../../mingw32/include
End of search list.
COLLECT_GCC_OPTIONS='-o' 'XmlResultReader.o' '-c' '-v' '-save-temps'
'-mtune=i386' '-march=i386'
 d:/programme/msys/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe
-fpreprocessed XmlResultReader.ii -quiet -dumpbase XmlResultReader.cpp
-mtune=i386 -march=i386 -auxbase-strip XmlResultReader.o -version -o
XmlResultReader.s
error: 5


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

* [Bug c++/47338] [4.5 Regression][C++] cc1plus returns exist code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
@ 2011-01-18 12:44 ` rguenth at gcc dot gnu.org
  2011-01-18 18:00 ` [Bug c++/47338] [4.5 Regression] " daniel.f.starke at freenet dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-18 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.3

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-18 11:30:27 UTC ---
Works on x86_64-linux.  Can you debug it please?


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

* [Bug c++/47338] [4.5 Regression] cc1plus returns exist code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
  2011-01-18 12:44 ` [Bug c++/47338] " rguenth at gcc dot gnu.org
@ 2011-01-18 18:00 ` daniel.f.starke at freenet dot de
  2011-01-18 18:21 ` [Bug c++/47338] [4.5 Regression] cc1plus returns exit " redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: daniel.f.starke at freenet dot de @ 2011-01-18 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from daniel.f.starke at freenet dot de 2011-01-18 17:30:54 UTC ---
What do you mean by debug? I can't even compile it because cc1plus exists half
the way.


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

* [Bug c++/47338] [4.5 Regression] cc1plus returns exit code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
  2011-01-18 12:44 ` [Bug c++/47338] " rguenth at gcc dot gnu.org
  2011-01-18 18:00 ` [Bug c++/47338] [4.5 Regression] " daniel.f.starke at freenet dot de
@ 2011-01-18 18:21 ` redi at gcc dot gnu.org
  2011-01-18 20:55 ` daniel.f.starke at freenet dot de
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-18 18:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-18 17:35:34 UTC ---
debug cc1plus to see where/why it exits, not debug your application


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

* [Bug c++/47338] [4.5 Regression] cc1plus returns exit code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
                   ` (2 preceding siblings ...)
  2011-01-18 18:21 ` [Bug c++/47338] [4.5 Regression] cc1plus returns exit " redi at gcc dot gnu.org
@ 2011-01-18 20:55 ` daniel.f.starke at freenet dot de
  2011-01-19 11:54 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: daniel.f.starke at freenet dot de @ 2011-01-18 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Daniel Starke <daniel.f.starke at freenet dot de> 2011-01-18 20:48:34 UTC ---
Here is the debugging output. I can attach the whole back-trace if needed.

GNU gdb (GDB) 7.2
Copyright (C) 2010 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
d:/programme/msys/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe...done.
(gdb) run -fpreprocessed XmlResultReader.ii -quiet -dumpbase XmlResultReader.ii
-mtune=i386 -march=i386 -auxbase-strip XmlResultReader.o -version -o
XmlResultReader.s
Starting program:
d:/programme/msys/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe
-fpreprocessed XmlResultReader.ii -quiet -dumpbase XmlResultReader.ii
-mtune=i386 -march=i386 -auxbase-strip XmlResultReader.o -version -o
XmlResultReader.s
[New Thread 4016.0x9f4]
GNU C++ (GCC) version 4.5.2 (mingw32)
        compiled by GNU C version 4.4.0, GMP version 5.0.1, MPFR version 3.0.0,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.5.2 (mingw32)
        compiled by GNU C version 4.4.0, GMP version 5.0.1, MPFR version 3.0.0,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 2ec00196c1446cde6554d87cd326f0cd
XmlResultReader.ii: In function 'std::_Resetiosflags
std::resetiosflags(std::ios_base::fmtflags)':
XmlResultReader.ii:70520:5: warning: extended initializer lists only available
with -std=c++0x or -std=gnu++0x
XmlResultReader.ii: In function 'std::_Setiosflags
std::setiosflags(std::ios_base::fmtflags)':
XmlResultReader.ii:70542:5: warning: extended initializer lists only available
with -std=c++0x or -std=gnu++0x
XmlResultReader.ii: In function 'std::_Setbase std::setbase(int)':
XmlResultReader.ii:70564:5: warning: extended initializer lists only available
with -std=c++0x or -std=gnu++0x
XmlResultReader.ii: In function 'std::_Setfill<_CharT> std::setfill(_CharT)':
XmlResultReader.ii:70594:7: warning: extended initializer lists only available
with -std=c++0x or -std=gnu++0x
XmlResultReader.ii: In function 'std::_Setprecision std::setprecision(int)':
XmlResultReader.ii:70616:5: warning: extended initializer lists only available
with -std=c++0x or -std=gnu++0x
XmlResultReader.ii: In function 'std::_Setw std::setw(int)':
XmlResultReader.ii:70638:5: warning: extended initializer lists only available
with -std=c++0x or -std=gnu++0x

Program received signal SIGSEGV, Segmentation fault.
0x006266d5 in ggc_set_mark (p=0x1d9fae40) at
../../gcc-4.5.2/gcc/ggc-page.c:1330
1330    {
(gdb) #0  0x006266d5 in ggc_set_mark (p=0x1d9fae40) at
../../gcc-4.5.2/gcc/ggc-page.c:1330
#1  0x00495798 in gt_ggc_mx_lang_tree_node (x_p=0x1d9fae40) at
./gt-cp-tree.h:146
#2  0x004963d8 in gt_ggc_mx_lang_tree_node (x_p=0x1d9fc800) at
./gt-cp-tree.h:440

[[[roughly 10 mega bytes of back-trace left out]]]

#136740 0x004961d0 in gt_ggc_mx_lang_tree_node (x_p=0x37f2ba0) at
./gt-cp-tree.h:397
#136741 0x00496668 in gt_ggc_mx_lang_tree_node (x_p=0x3872600) at
./gt-cp-tree.h:373
#136742 0x005e9102 in gt_ggc_mx_cgraph_node (x_p=0x1a129170) at
gtype-desc.c:393
#136743 0x005e929f in gt_ggc_m_P11cgraph_node4htab (x_p=0x56032c0) at
gtype-desc.c:2396
#136744 0x00654f05 in ggc_mark_roots () at ../../gcc-4.5.2/gcc/ggc-common.c:167
#136745 0x00626ed6 in ggc_collect () at ../../gcc-4.5.2/gcc/ggc-page.c:1962
#136746 0x005d34ad in execute_todo (flags=3) at
../../gcc-4.5.2/gcc/passes.c:1309
#136747 0x005d3aba in execute_one_pass (pass=0xb68fa0) at
../../gcc-4.5.2/gcc/passes.c:1591
#136748 0x005d3ca1 in execute_pass_list (pass=0xb68fa0) at
../../gcc-4.5.2/gcc/passes.c:1623
#136749 0x007503ba in tree_rest_of_compilation (fndecl=0x1f9c7f00) at
../../gcc-4.5.2/gcc/tree-optimize.c:413
#136750 0x005d5dd0 in cgraph_expand_function (node=<value optimized out>) at
../../gcc-4.5.2/gcc/cgraphunit.c:1574
#136751 0x005d8b3b in cgraph_output_in_order () at
../../gcc-4.5.2/gcc/cgraphunit.c:1747
#136752 cgraph_optimize () at ../../gcc-4.5.2/gcc/cgraphunit.c:1904
#136753 0x005d8d07 in cgraph_finalize_compilation_unit () at
../../gcc-4.5.2/gcc/cgraphunit.c:1122
#136754 0x0044f4a5 in cp_write_global_declarations () at
../../gcc-4.5.2/gcc/cp/decl2.c:3833
#136755 0x006050dd in compile_file (argc=13, argv=0x38e2b20) at
../../gcc-4.5.2/gcc/toplev.c:1065
#136756 do_compile (argc=13, argv=0x38e2b20) at
../../gcc-4.5.2/gcc/toplev.c:2417
#136757 toplev_main (argc=13, argv=0x38e2b20) at
../../gcc-4.5.2/gcc/toplev.c:2459
#136758 0x004e612c in main (argc=13, argv=0x38e2b20) at
../../gcc-4.5.2/gcc/main.c:35


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

* [Bug c++/47338] [4.5 Regression] cc1plus returns exit code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
                   ` (3 preceding siblings ...)
  2011-01-18 20:55 ` daniel.f.starke at freenet dot de
@ 2011-01-19 11:54 ` rguenth at gcc dot gnu.org
  2011-01-19 20:42 ` pinskia at gcc dot gnu.org
  2011-01-20 19:27 ` daniel.f.starke at freenet dot de
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-19 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-19 10:49:04 UTC ---
So you ran out of stack-space during garbage collecting.  A not uncommon
problem.  As you can reproduce it you now need to identify the chain
that is walked and see if we can avoid the recursion at some place.
Or simply assign more stack-space to cc1plus (what's the default on
mingw32 for that?)


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

* [Bug c++/47338] [4.5 Regression] cc1plus returns exit code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
                   ` (4 preceding siblings ...)
  2011-01-19 11:54 ` rguenth at gcc dot gnu.org
@ 2011-01-19 20:42 ` pinskia at gcc dot gnu.org
  2011-01-20 19:27 ` daniel.f.starke at freenet dot de
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-01-19 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-01-19 20:10:29 UTC ---
(In reply to comment #5)
> (what's the default on mingw32 for that?)
The default stack under Windows is low.  
This was all fixed with:
r167400 | davek | 2010-12-02 15:30:47 -0800 (Thu, 02 Dec 2010) | 6 lines

        * mh-cygwin (LDFLAGS): Turn up stack allocation to 12MB.
        (BOOT_LDFLAGS): Add matching stack size flag.
        * mh-mingw (LDFLAGS): Likewise.
        (BOOT_LDFLAGS): Likewise.


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

* [Bug c++/47338] [4.5 Regression] cc1plus returns exit code 5
  2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
                   ` (5 preceding siblings ...)
  2011-01-19 20:42 ` pinskia at gcc dot gnu.org
@ 2011-01-20 19:27 ` daniel.f.starke at freenet dot de
  6 siblings, 0 replies; 8+ messages in thread
From: daniel.f.starke at freenet dot de @ 2011-01-20 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Daniel Starke <daniel.f.starke at freenet dot de> 2011-01-20 18:51:53 UTC ---
As this patch also works with gcc 4.5.x I'd like to request this change for the
gcc 4.5 branch as well.


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

end of thread, other threads:[~2011-01-20 18:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18  9:22 [Bug c++/47338] New: [4.5 Regression][C++] cc1plus returns exist code 5 daniel.f.starke at freenet dot de
2011-01-18 12:44 ` [Bug c++/47338] " rguenth at gcc dot gnu.org
2011-01-18 18:00 ` [Bug c++/47338] [4.5 Regression] " daniel.f.starke at freenet dot de
2011-01-18 18:21 ` [Bug c++/47338] [4.5 Regression] cc1plus returns exit " redi at gcc dot gnu.org
2011-01-18 20:55 ` daniel.f.starke at freenet dot de
2011-01-19 11:54 ` rguenth at gcc dot gnu.org
2011-01-19 20:42 ` pinskia at gcc dot gnu.org
2011-01-20 19:27 ` daniel.f.starke at freenet dot de

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).