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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to