Closed llvmbot closed 14 years ago
I believe that. Unfortunately our C++ front-end is pretty far out of date. The last time we sync'd up with CVS was Sep 24. If you find a GCC PR for this, it will probably indicate the patch that fixed it and we could arrange to pull it in...
Updating the C front-end to newer GCC CVS is definitely something we want to do, we just don't have the man-power for it right now...
-Chris
Just a bit of additional info: regular gcc 3.4 from 2004-02-22 (Debian package) does not crash on that code, so maybe the bug was already fixed by that date.
This is a segfault in the non-LLVM-specific parts of the G++ parser, with this backtrace:
koenig_p=false) at ../../gcc-3.4-cvs/gcc/cp/semantics.c:1636
address_p=false) at ../../gcc-3.4-cvs/gcc/cp/parser.c:3582
address_p=false) at ../../gcc-3.4-cvs/gcc/cp/parser.c:4116
../../gcc-3.4-cvs/gcc/cp/parser.c:13779
token_tree_map=0x84947a4, fn=0x80f71d0
../../gcc-3.4-cvs/gcc/cp/parser.c:4561
token_tree_map=0x84947b0, fn=0x80ed7d0
../../gcc-3.4-cvs/gcc/cp/parser.c:4585
token_tree_map=0x84947c0, fn=0x80ed800
../../gcc-3.4-cvs/gcc/cp/parser.c:4608
token_tree_map=0x84947cc, fn=0x80ed830
../../gcc-3.4-cvs/gcc/cp/parser.c:4631
token_tree_map=0x84947d8, fn=0x80ed860
This will probably be fixed in the future by merging newer bits into the LLVM G++ front-end from GCC CVS, but until then there is nothing that we can really do about it.
-Chris
Replicated the crash on powerpc-apple-darwin7.3.0. However, I don't seem to be getting a backtrace out of gdb today. Maybe my luck will be better next time. Marking this as crash-on-invalid because of the errors I get from cc1plus. Inquiring minds want to know -- what hardware platform are you using? (your bug report says "Other").
persephone:~/Desktop gaeke$ gdb --args !-2
gdb --args $cc1plus -quiet -o dfs.s dfs.ii
GNU gdb 5.3-20030128 (Apple version gdb-309) (Thu Dec 4 15:41:30 GMT 2003)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin".
Reading symbols for shared libraries ... done
(gdb) run
Starting program: /Users/gaeke/cfrontend/install/libexec/gcc/powerpc-apple-darwin7.3.0/3.4-llvm/
cc1plus -quiet -o dfs.s dfs.ii
Reading symbols for shared libraries . done
In file included from /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/
3.4-llvm/../../../../include/c++/3.4-llvm/bits/stl_algobase.h:69,
from /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-
llvm/../../../../include/c++/3.4-llvm/bits/char_traits.h:46,
from /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-
llvm/../../../../include/c++/3.4-llvm/ios:46,
from /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-
llvm/../../../../include/c++/3.4-llvm/ostream:45,
from /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-
llvm/../../../../include/c++/3.4-llvm/iterator:70,
from /home/ghost/Work/boost/boost/test/detail/unit_test_config.hpp:22,
from /home/ghost/Work/boost/boost/test/test_tools.hpp:20,
from dfs.cpp:27:
/home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../
include/c++/3.4-llvm/new:82: error: operator new' takes type
size_t' (long unsigned int') as first parameter /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../ include/c++/3.4-llvm/new:83: error:
operator new' takes type size_t' (
long unsigned int') as first
parameter
/home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../
include/c++/3.4-llvm/new:86: error: operator new' takes type
size_t' (long unsigned int') as first parameter /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../ include/c++/3.4-llvm/new:87: error:
operator new' takes type size_t' (
long unsigned int') as first
parameter
/home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../
include/c++/3.4-llvm/new:92: error: operator new' takes type
size_t' (long unsigned int') as first parameter /home/ghost/build/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../ include/c++/3.4-llvm/new:93: error:
operator new' takes type size_t' (
long unsigned int') as first
parameter
In file included from dfs.cpp:33:
/home/ghost/Work/boost/boost/graph/graph_utility.hpp: In function void boost:: print_in_edges(const IncidenceGraph&, Name)': /home/ghost/Work/boost/boost/graph/graph_utility.hpp:171: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp:175: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp:176: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp: In function
void boost::
print_graph_dispatch(const IncidenceGraph&, Name, boost::directed_tag)':
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:185: error: cout' is not a member of
std'
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:189: error: cout' is not a member of
std'
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:190: error: cout' is not a member of
std'
/home/ghost/Work/boost/boost/graph/graph_utility.hpp: In function void boost:: print_graph_dispatch(const IncidenceGraph&, Name, boost::undirected_tag)': /home/ghost/Work/boost/boost/graph/graph_utility.hpp:198: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp:202: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp:203: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp: In function
void boost::print_edges(const
EdgeListGraph&, Name)':
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:223: error: cout' is not a member of
std'
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:225: error: cout' is not a member of
std'
/home/ghost/Work/boost/boost/graph/graph_utility.hpp: In function void boost::print_edges2(const EdgeListGraph&, VertexName, EdgeName)': /home/ghost/Work/boost/boost/graph/graph_utility.hpp:233: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp:235: error:
cout' is not a member of std' /home/ghost/Work/boost/boost/graph/graph_utility.hpp: In function
void boost::print_vertices(const
VertexListGraph&, Name)':
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:243: error: cout' is not a member of
std'
/home/ghost/Work/boost/boost/graph/graph_utility.hpp:244: error: cout' is not a member of
std'
Program received signal EXC_BAD_ACCESS, Could not access memory. finish_call_expr (fn=0xf53310, args=0x0, disallow_virtual=false, koenig_p=false) at ../../src/gcc/cp/ semantics.c:1636 1636 TYPE_BINFO (type), (gdb) where
cp/semantics.c:1636
Extended Description
When I try llvmg++ on a code from C++ boost graph library, I get the following:
home/ghost/Work/boost/boost/random/linear_congruential.hpp:213: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://llvm.cs.uiuc.edu> for instructions.
The procesourced source code is available at http://zigzag.cs.msu.su/~ghost/dfs.ii