Assertion violations

Testing clang against GCC's test suite results into several
violated assertions. Are you interested in receiving bug
reports for those?

Testing clang against GCC's test suite results into several
violated assertions. Are you interested in receiving bug
reports for those?

Yes, please! We're always interested in fixing assertions.

John.

Testing clang against GCC’s test suite results into several
violated assertions. Are you interested in receiving bug
reports for those?

Yes, thanks.


float-range-1.c


[Thread 1] APFloat.cpp:161: int readExponent(const char*, const char*): Assertion failed: p == end && “Invalid exponent in exponent”
Stack dump:
0. float-range-1.c:12:13: current parser token ‘1e+100000000f’

  1. float-range-1.c:11:1: parsing function body ‘f’
  2. float-range-1.c:11:1: in compound statement (’{}’)
    Aborted (core dumped)

I fixed this one, 111534. Incidentally, gcc-4.2 warns on this only with -pedantic, while clang warns by default. Is that intentional?


c99-hexfloat-3.c


[Thread 1] APFloat.cpp:2248: llvm::APFloat::opStatus llvm::APFloat::convertFromHexadecimalString(llvm::StringRef, llvm::APFloat::roundingMode): Assertion failed: (dot == end || p - begin != 1) && “Significand has no digits”
Stack dump:
0. c99-hexfloat-3.c:16:13: current parser token ‘0x.p0’
Aborted (core dumped)

clang is correct to reject this although of course it should not crash. Generally APFloat expects correct input and asserts if it doesn’t find it, so the fix should probably be upstream.

I have submitted the following:

   http://llvm.org/bugs/show_bug.cgi?id=7941
   http://llvm.org/bugs/show_bug.cgi?id=7942
   http://llvm.org/bugs/show_bug.cgi?id=7943

Thanks,

    Roberto