[llvm-bugs] [Bug 43268] New: clang 9 rc4 regression: AST/Decl.cpp:3336: bool clang::FunctionDecl::isInlineDefinitionExternallyVisible() const: Assertion `(doesThisDeclarationHaveABody() || willHaveBody()) && "Must be a function definition"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 10 12:22:15 PDT 2019


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

            Bug ID: 43268
           Summary: clang 9 rc4 regression: AST/Decl.cpp:3336: bool
                    clang::FunctionDecl::isInlineDefinitionExternallyVisib
                    le() const: Assertion `(doesThisDeclarationHaveABody()
                    || willHaveBody()) && "Must be a function definition"'
                    failed
           Product: clang
           Version: 9.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrew at ziglang.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Created attachment 22482
  --> https://bugs.llvm.org/attachment.cgi?id=22482&action=edit
/run/user/1001/stat-ce2dd5.c

This regressed from LLVM 9.0.0 release candidate 3.

[nix-shell:~/zig-9/build]$ ~/local-llvm9-debug/bin/clang -MD -MV -MF
/home/andy/.local/share/zig/stage1/tmp/CuMHrPPk3OJv-stat.o.d -nostdinc
-fno-spell-checking -isystem /home/andy/zig-9/build/lib/zig/include
-march=native -g -fno-omit-frame-pointer -D_DEBUG -fno-stack-protector -fPIC -o
/home/andy/.local/share/zig/stage1/tmp/CuMHrPPk3OJv-stat.o -c
/home/andy/zig-9/build/lib/zig/libc/glibc/io/stat.c -std=gnu11 -fgnu89-inline
-g -O2 -fmerge-all-constants -fno-stack-protector -fmath-errno
-ftls-model=initial-exec -Wno-ignored-attributes -I
/home/andy/zig-9/build/lib/zig/libc/glibc/include -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/x86_64 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/x86 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86_64/nptl -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86/nptl -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/include -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/nptl -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/pthread -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/x86_64 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/x86 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86_64 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/generic -I
/home/andy/zig-9/build/lib/zig/libc/glibc -I
/home/andy/zig-9/build/lib/zig/libc/include/x86_64-linux-gnu -I
/home/andy/zig-9/build/lib/zig/libc/include/generic-glibc -I
/home/andy/zig-9/build/lib/zig/libc/include/x86_64-linux-any -I
/home/andy/zig-9/build/lib/zig/libc/include/any-linux-any -D_LIBC_REENTRANT
-include /home/andy/zig-9/build/lib/zig/libc/glibc/include/libc-modules.h
-DMODULE_NAME=libc -include
/home/andy/zig-9/build/lib/zig/libc/glibc/include/libc-symbols.h -DPIC
-DLIBC_NONSHARED=1 -DTOP_NAMESPACE=glibc
clang-9: /home/andy/llvm-project/clang/lib/AST/Decl.cpp:3336: bool
clang::FunctionDecl::isInlineDefinitionExternallyVisible() const: Assertion
`(doesThisDeclarationHaveABody() || willHaveBody()) && "Must be a function
definition"' failed.
Stack dump:
0.      Program arguments: /home/andy/local-llvm9-debug/bin/clang-9 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name stat.c
-mrelocation-model pic -pic-level 2 -mthread-model posix -fmerge-all-constants
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu broadwell -target-feature +sse2
-target-feature +cx16 -target-feature +sahf -target-feature -tbm
-target-feature -avx512ifma -target-feature -sha -target-feature -gfni
-target-feature -fma4 -target-feature -vpclmulqdq -target-feature +prfchw
-target-feature +bmi2 -target-feature -cldemote -target-feature +fsgsbase
-target-feature -ptwrite -target-feature -xsavec -target-feature +popcnt
-target-feature -mpx -target-feature +aes -target-feature -avx512bitalg
-target-feature -movdiri -target-feature -xsaves -target-feature -avx512er
-target-feature -avx512vnni -target-feature -avx512vpopcntdq -target-feature
-pconfig -target-feature -clwb -target-feature -avx512f -target-feature -clzero
-target-feature -pku -target-feature +mmx -target-feature -lwp -target-feature
-rdpid -target-feature -xop -target-feature +rdseed -target-feature -waitpkg
-target-feature -movdir64b -target-feature -sse4a -target-feature -avx512bw
-target-feature -clflushopt -target-feature +xsave -target-feature -avx512vbmi2
-target-feature +64bit -target-feature -avx512vl -target-feature +invpcid
-target-feature -avx512cd -target-feature +avx -target-feature -vaes
-target-feature +cx8 -target-feature +fma -target-feature +rtm -target-feature
+bmi -target-feature -enqcmd -target-feature +rdrnd -target-feature -mwaitx
-target-feature +sse4.1 -target-feature +sse4.2 -target-feature +avx2
-target-feature +fxsr -target-feature -wbnoinvd -target-feature +sse
-target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1
-target-feature +f16c -target-feature +ssse3 -target-feature -sgx
-target-feature -shstk -target-feature +cmov -target-feature -avx512vbmi
-target-feature -avx512bf16 -target-feature +movbe -target-feature +xsaveopt
-target-feature -avx512dq -target-feature +adx -target-feature -avx512pf
-target-feature +sse3 -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer
-coverage-notes-file
/home/andy/.local/share/zig/stage1/tmp/CuMHrPPk3OJv-stat.gcno -nostdsysteminc
-nobuiltininc -resource-dir /home/andy/local-llvm9-debug/lib/clang/9.0.0
-dependency-file /home/andy/.local/share/zig/stage1/tmp/CuMHrPPk3OJv-stat.o.d
-MT /home/andy/.local/share/zig/stage1/tmp/CuMHrPPk3OJv-stat.o -sys-header-deps
-MV -isystem /home/andy/zig-9/build/lib/zig/include -include
/home/andy/zig-9/build/lib/zig/libc/glibc/include/libc-modules.h -include
/home/andy/zig-9/build/lib/zig/libc/glibc/include/libc-symbols.h -D _DEBUG -I
/home/andy/zig-9/build/lib/zig/libc/glibc/include -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/x86_64 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/x86 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86_64/nptl -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86/nptl -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux/include -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv/linux -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/nptl -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/pthread -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/sysv -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/x86_64 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix/x86 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/unix -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86_64 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/x86 -I
/home/andy/zig-9/build/lib/zig/libc/glibc/sysdeps/generic -I
/home/andy/zig-9/build/lib/zig/libc/glibc -I
/home/andy/zig-9/build/lib/zig/libc/include/x86_64-linux-gnu -I
/home/andy/zig-9/build/lib/zig/libc/include/generic-glibc -I
/home/andy/zig-9/build/lib/zig/libc/include/x86_64-linux-any -I
/home/andy/zig-9/build/lib/zig/libc/include/any-linux-any -D _LIBC_REENTRANT -D
MODULE_NAME=libc -D PIC -D LIBC_NONSHARED=1 -D TOP_NAMESPACE=glibc -O2
-Wno-ignored-attributes -std=gnu11 -fdebug-compilation-dir
/home/andy/zig-9/build -ferror-limit 19 -fmessage-length 0
-ftls-model=initial-exec -fgnu89-inline -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -fno-spell-checking
-vectorize-loops -vectorize-slp -faddrsig -o
/home/andy/.local/share/zig/stage1/tmp/CuMHrPPk3OJv-stat.o -x c
/home/andy/zig-9/build/lib/zig/libc/glibc/io/stat.c 
1.      <eof> parser at end of file
2.      /home/andy/zig-9/build/lib/zig/libc/glibc/io/stat.c:54:1
<Spelling=/home/andy/zig-9/build/lib/zig/libc/glibc/io/stat.c:54:28>: LLVM IR
generation of declaration 'stat'
 #0 0x0000000004328c40 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/andy/llvm-project/llvm/lib/Support/Unix/Signals.inc:533:0
 #1 0x0000000004328cd3 PrintStackTraceSignalHandler(void*)
/home/andy/llvm-project/llvm/lib/Support/Unix/Signals.inc:594:0
 #2 0x0000000004326e7f llvm::sys::RunSignalHandlers()
/home/andy/llvm-project/llvm/lib/Support/Signals.cpp:68:0
 #3 0x00000000043286ba SignalHandler(int)
/home/andy/llvm-project/llvm/lib/Support/Unix/Signals.inc:385:0
 #4 0x00007fa62654af10 __restore_rt
(/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libpthread.so.0+0x11f10)
 #5 0x00007fa62525fbe0 raise
(/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libc.so.6+0x34be0)
 #6 0x00007fa625260dc1 abort
(/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libc.so.6+0x35dc1)
 #7 0x00007fa6252586e7 __assert_fail_base
(/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libc.so.6+0x2d6e7)
 #8 0x00007fa625258792
(/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libc.so.6+0x2d792)
 #9 0x00000000063f107a
clang::FunctionDecl::isInlineDefinitionExternallyVisible() const
(/home/andy/local-llvm9-debug/bin/clang-9+0x63f107a)
clang-9: error: unable to execute command: Aborted
clang-9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.0 (https://github.com/llvm/llvm-project
127240acf1001b72c0c52863ffe3dc39b7c5fd6d)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/andy/local-llvm9-debug/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang-9: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /run/user/1001/stat-ce2dd5.c
clang-9: note: diagnostic msg: /run/user/1001/stat-ce2dd5.sh
clang-9: note: diagnostic msg:

********************

-- 
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/20190910/2c048fd2/attachment.html>


More information about the llvm-bugs mailing list