[llvm-bugs] [Bug 37906] New: valid sizeof operation introduced compiler crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 22 09:37:56 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37906
Bug ID: 37906
Summary: valid sizeof operation introduced compiler crash
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: pickensd at synopsys.com
CC: llvm-bugs at lists.llvm.org
The following C test case causes clang to crash.
Assertion failed: (ND->isUsed(false) || !isa<VarDecl>(ND) ||
!E->getLocation().isValid()) && "Should not use decl without marking it used!",
file C:\src\llvm_package_333363\llvm\tools\clang\lib\CodeGen\CGExpr.cpp, line
2453
% clang --version
clang version 7.0.0 (trunk)
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files (x86)\LLVM\bin
Test case:
---------------- test.c --------------------------------------
#include <stdarg.h>
extern void exit (int);
extern void abort (void);
char a[1];
void
f1 (void)
{
int i = 0;
int j = sizeof (typeof (*(++i, (char (*)[i])a)));
if (i != 1 || j != 1)
abort ();
}
int
main (void)
{
f1 ();
exit (0);
}
--
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/20180622/9812e364/attachment.html>
More information about the llvm-bugs
mailing list