[llvm-bugs] [Bug 51868] New: Clang crashes with broken program containing _Complex int and fixed-point literal

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 15 05:43:00 PDT 2021


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

            Bug ID: 51868
           Summary: Clang crashes with broken program containing _Complex
                    int and fixed-point literal
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: crash-on-invalid
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.stenberg at ericsson.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Commit: d261d4cf559d96eb4e45d8699df2557e2998fc88

Compiling the following broken program:

f() { for (_Complex int a_1 0.5r / a_2

with:

$ clang -ffixed-point foo.c

gives:

foo.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
f() { for (_Complex int a_1 0.5r / a_2
^
foo.c:1:29: error: expected ';' in 'for' statement specifier
f() { for (_Complex int a_1 0.5r / a_2
                            ^
getIntegerRank(): not a built-in integer
UNREACHABLE executed at /clang/lib/AST/ASTContext.cpp:6402!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.

If e.g. switching to a floating-point literal the crash is not seen.

-- 
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/20210915/26a51402/attachment.html>


More information about the llvm-bugs mailing list