[llvm-bugs] [Bug 31009] New: ice on x86_64-linux-gnu (gcc accepts the program. unsupported TypeLoc kind in declarator! UNREACHABLE executed at /tmp/llvm-builder/llvm-source-trunk/tools/clang/lib/Sema/SemaType.cpp:5262!)

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 14 01:00:21 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31009

            Bug ID: 31009
           Summary: ice on x86_64-linux-gnu (gcc accepts the program.
                    unsupported TypeLoc kind in declarator! UNREACHABLE
                    executed at
                    /tmp/llvm-builder/llvm-source-trunk/tools/clang/lib/Se
                    ma/SemaType.cpp:5262!)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

gcc accepts the code, whereas clang crashes. 

$ clang-trunk -v
clang version 4.0.0 (trunk 286765)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.4
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$ 
$ clang-trunk small.c
small.c:1:37: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
( __attribute__ ((vector_size (8))) a);
                                    ^
unsupported TypeLoc kind in declarator!
UNREACHABLE executed at
/tmp/llvm-builder/llvm-source-trunk/tools/clang/lib/Sema/SemaType.cpp:5262!
#0 0x0000000001e47245 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e47245)
#1 0x0000000001e4534e llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-4.0+0x1e4534e)
#2 0x0000000001e454b0 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e454b0)
#3 0x00007f1c68a718d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xf8d0)
#4 0x00007f1c67679067 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35067)
#5 0x00007f1c6767a448 abort (/lib/x86_64-linux-gnu/libc.so.6+0x36448)
#6 0x0000000001df854a (/usr/local/clang-trunk/bin/clang-4.0+0x1df854a)
#7 0x0000000002f9dc3c (/usr/local/clang-trunk/bin/clang-4.0+0x2f9dc3c)
#8 0x0000000002fae22f
clang::Sema::GetTypeSourceInfoForDeclarator(clang::Declarator&,
clang::QualType, clang::TypeSourceInfo*)
(/usr/local/clang-trunk/bin/clang-4.0+0x2fae22f)
#9 0x0000000002fb6d62 GetFullTypeForDeclarator((anonymous
namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*)
(/usr/local/clang-trunk/bin/clang-4.0+0x2fb6d62)
#10 0x0000000002fb88a2 clang::Sema::GetTypeForDeclarator(clang::Declarator&,
clang::Scope*) (/usr/local/clang-trunk/bin/clang-4.0+0x2fb88a2)
#11 0x0000000002c3ad50 clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/usr/local/clang-trunk/bin/clang-4.0+0x2c3ad50)
#12 0x0000000002c3b945 clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&) (/usr/local/clang-trunk/bin/clang-4.0+0x2c3b945)
#13 0x0000000002993871
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/usr/local/clang-trunk/bin/clang-4.0+0x2993871)
#14 0x00000000029a15a5 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/local/clang-trunk/bin/clang-4.0+0x29a15a5)
#15 0x000000000297d729
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/usr/local/clang-trunk/bin/clang-4.0+0x297d729)
#16 0x000000000297ddd1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) [clone .part.225]
(/usr/local/clang-trunk/bin/clang-4.0+0x297ddd1)
#17 0x000000000297de0f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/usr/local/clang-trunk/bin/clang-4.0+0x297de0f)
#18 0x0000000002980218
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/usr/local/clang-trunk/bin/clang-4.0+0x2980218)
#19 0x00000000029836f2
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/usr/local/clang-trunk/bin/clang-4.0+0x29836f2)
#20 0x000000000298392c
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/usr/local/clang-trunk/bin/clang-4.0+0x298392c)
#21 0x000000000297b09b clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-4.0+0x297b09b)
#22 0x00000000025aa25b clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-4.0+0x25aa25b)
#23 0x00000000022c35ee clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-4.0+0x22c35ee)
#24 0x000000000229953e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-4.0+0x229953e)
#25 0x000000000234cfb2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-4.0+0x234cfb2)
#26 0x0000000000be3c68 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-4.0+0xbe3c68)
#27 0x0000000000b86466 main (/usr/local/clang-trunk/bin/clang-4.0+0xb86466)
#28 0x00007f1c67665b45 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b45)
#29 0x0000000000bdfebe _start (/usr/local/clang-trunk/bin/clang-4.0+0xbdfebe)
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
small.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-resource-dir /usr/local/clang-trunk/bin/../lib/clang/4.0.0 -internal-isystem
/usr/local/include -internal-isystem
/usr/local/clang-trunk/bin/../lib/clang/4.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir
/home/cnsun/workspace/meta-compiler/error-fuzzer/exp-runs/crash/RandomTokenManipulationFuzzingEngine/20161028-clang-trunk--Weverything-O3-c-std=c11-build-174614/reduction
-ferror-limit 19 -fmessage-length 122 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/small-2cde5d.o -x c
small.c 
1.      small.c:1:39: current parser token ';'
clang-4.0: error: unable to execute command: Aborted
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 286765)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /tmp/small-0b699e.c
clang-4.0: note: diagnostic msg: /tmp/small-0b699e.sh
clang-4.0: note: diagnostic msg: 

********************
$ 
$ gcc-trunk -c -w small.c
$ 
$ cat small.c 
( __attribute__ ((vector_size (8))) a);
$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161114/ebcfcafa/attachment-0001.html>


More information about the llvm-bugs mailing list