Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

failed assertion `SS == getCurFunction()->SwitchStack.back() && "switch stack missing push/pop!"' #14485

Open Quuxplusone opened 11 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR14464
Status NEW
Importance P normal
Reported by vince (vince@macports.org)
Reported on 2012-11-30 07:22:51 -0800
Last modified on 2012-12-03 13:08:55 -0800
Version 3.2
Hardware Macintosh MacOS X
CC llvm-bugs@lists.llvm.org, pawel@32bitmicro.com, rafael@espindo.la
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
When I try to compile the ld64 (97.17) linker from Apple cctools on MacOS 10.4
(arch = ppc) I get the following error:

/opt/local/bin/clang++-mp-3.2 -Os -O2 -arch ppc -I/opt/local/libexec/llvm-
3.2/include -DLTO_SUPPORT -Isrc/abstraction -Isrc/ld -I/opt/local/include  -c -
o src/other/ObjectDump.o src/other/ObjectDump.cpp
In file included from src/other/ObjectDump.cpp:31:
In file included from src/ld/MachOReaderRelocatable.hpp:33:
In file included from /usr/include/c++/4.0.0/vector:65:
/usr/include/c++/4.0.0/bits/stl_algobase.h:64:10: fatal error:
'bits/c++config.h' file not found
#include <bits/c++config.h>
         ^
SemaStmt.cpp:625: failed assertion `SS == getCurFunction()->SwitchStack.back()
&& "switch stack missing push/pop!"'
Stack dump:
0.  Program arguments: /opt/local/libexec/llvm-3.2/bin/clang -cc1 -triple
powerpc-apple-darwin8.11.0 -S -disable-free -main-file-name ObjectDump.cpp -pic-
level 2 -mdisable-fp-elim -fmath-errno -target-linker-version 97.17 -coverage-
file /tmp/ObjectDump-Jh3aJw.s -resource-dir /opt/local/libexec/llvm-
3.2/bin/../lib/clang/3.2 -D LTO_SUPPORT -I /opt/local/libexec/llvm-3.2/include -
I src/abstraction -I src/ld -I /opt/local/include -fmodule-cache-path
/var/tmp/clang-module-cache -I/opt/local/include -O2 -fdeprecated-macro -fno-
dwarf2-cfi-asm -fno-dwarf-directory-asm -fdebug-compilation-dir
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-
97.17 -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -
fcxx-exceptions -fexceptions -fdiagnostics-show-option -o /tmp/ObjectDump-
Jh3aJw.s -x c++ src/other/ObjectDump.cpp
1.  src/ld/MachOReaderRelocatable.hpp:2469:4: current parser token '}'
2.  src/ld/MachOReaderRelocatable.hpp:62:1: parsing namespace 'mach_o'
3.  src/ld/MachOReaderRelocatable.hpp:63:1: parsing namespace 'relocatable'
4.  src/ld/MachOReaderRelocatable.hpp:1944:1: parsing function body
5.  src/ld/MachOReaderRelocatable.hpp:1944:1: in compound statement ('{}')
6.  src/ld/MachOReaderRelocatable.hpp:2410:81: in compound statement ('{}')
7.  src/ld/MachOReaderRelocatable.hpp:2415:28: in compound statement ('{}')
8.  src/ld/MachOReaderRelocatable.hpp:2428:9: in compound statement ('{}')
clang: error: unable to execute command: Abort trap
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (branches/release_32 168259)
Target: powerpc-apple-darwin8.11.0
Thread model: posix

Any idea to what it is related to?

TIA,
Vincent
Quuxplusone commented 11 years ago
Looks like a problem with platform name prevents including <bits/c++config.h>.

This macports bug might help:

"llvm-gcc42: can't find bits/c++config.h on Leopard/PPC"
https://trac.macports.org/ticket/33293
Quuxplusone commented 11 years ago
You mean that the exception is triggered by the missing include file? I am
going to correct this, but there should maybe be a cleaner way out, no?
Cheers
Quuxplusone commented 11 years ago
It is no better when the missing include file is found. I get another assert:

/opt/local/bin/clang++-mp-3.2 -Os -O2 -arch ppc -I/opt/local/libexec/llvm-
3.2/include -DLTO_SUPPORT -Isrc/abstraction -Isrc/ld -I/opt/local/include -I
/usr/include/c++/4.0.0/ppc-apple-darwin8/ -c -o src/other/ObjectDump.o
src/other/ObjectDump.cpp
Instructions.cpp:1080: failed assertion `getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a
pointer to Val type!"'
Stack dump:
0.  Program arguments: /opt/local/libexec/llvm-3.2/bin/clang -cc1 -triple
powerpc-apple-darwin8.11.0 -S -disable-free -main-file-name ObjectDump.cpp -pic-
level 2 -mdisable-fp-elim -fmath-errno -target-linker-version 97.17 -coverage-
file /tmp/ObjectDump-ccPOhs.s -resource-dir /opt/local/libexec/llvm-
3.2/bin/../lib/clang/3.2 -D LTO_SUPPORT -I /opt/local/libexec/llvm-3.2/include -
I src/abstraction -I src/ld -I /opt/local/include -I /usr/include/c++/4.0.0/ppc-
apple-darwin8/ -fmodule-cache-path /var/tmp/clang-module-cache -O2 -fdeprecated-
macro -fno-dwarf2-cfi-asm -fno-dwarf-directory-asm -fdebug-compilation-dir
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64/work/ld64-
97.17 -ferror-limit 19 -fmessage-length 157 -mstackrealign -fobjc-runtime=gcc -
fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/ObjectDump-ccPOhs.s -x c++ src/other/ObjectDump.cpp
1.  src/ld/MachOReaderRelocatable.hpp:6123:2: current parser token ';'
2.  src/ld/MachOReaderRelocatable.hpp:62:11: LLVM IR generation of declaration
'mach_o'
3.  src/ld/MachOReaderRelocatable.hpp:354:16: Generating code for declaration
'mach_o::relocatable::BaseAtom::setCompactUnwindEncoding'
4.  src/ld/MachOReaderRelocatable.hpp:355:1: LLVM IR generation of compound
statement ('{}')
clang: error: unable to execute command: Trace/BPT trap
clang: error: clang frontend command failed due to signal (use -v to see
invocation)