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

            Bug ID: 49416
           Summary: Converting between pointers to signed and unsigned
                    _ExtInt causes crash
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

The following code causes clang trunk to crash.

// -----------------------------
// https://godbolt.org/z/z138v6
// -----------------------------

void f(unsigned _ExtInt(32)* n);

void g(_ExtInt(32)* n) {
    f(n);
}

// -----------------------------

It's unclear to me whether this program is intended to be supported by _ExtInt
or not, but in either case, it should not cause a crash.

Inserting a cast seems to work around the problem:

// -----------------------------
// https://godbolt.org/z/nKKPY7
// -----------------------------

void f(unsigned _ExtInt(32)* n);

void g(_ExtInt(32)* n) {
    f((unsigned _ExtInt(32)*)n);
}

// -----------------------------

-- 
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