Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /data/home/rdivacky/llvm/include/llvm/Support/Casting.h, line 200. #7120

Closed Quuxplusone closed 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR6672
Status RESOLVED FIXED
Importance P normal
Reported by Roman Divacky (rdivacky@freebsd.org)
Reported on 2010-03-22 04:15:32 -0700
Last modified on 2010-03-22 05:02:43 -0700
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
pes delta$ cat ios.cc
   typedef int _Atomic_word;
    namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
            static inline _Atomic_word   __exchange_and_add(volatile _Atomic_word* __mem, int __val)   {
   }
       static inline _Atomic_word   __attribute__ ((__unused__))   __exchange_and_add_dispatch(_Atomic_word* __mem, int __val)   {
        }
     }
      namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
       class locale   {
     };
     }
     namespace std __attribute__ ((__visibility__ ("default"))) {
           enum _Ios_Fmtflags     {
         _S_boolalpha = 1L << 0,       _S_dec = 1L << 1,       _S_fixed = 1L << 2,       _S_hex = 1L << 3,       _S_internal = 1L << 4,       _S_left = 1L << 5,       _S_oct = 1L << 6,       _S_right = 1L << 7,       _S_scientific = 1L << 8,       _S_showbase = 1L << 9,       _S_showpoint = 1L << 10,       _S_showpos = 1L << 11,       _S_skipws = 1L << 12,       _S_unitbuf = 1L << 13,       _S_uppercase = 1L << 14,       _S_adjustfield = _S_left | _S_right | _S_internal,       _S_basefield = _S_dec | _S_oct | _S_hex,       _S_floatfield = _S_scientific | _S_fixed,       _S_ios_fmtflags_end = 1L << 16     };
       class ios_base   {
        static int     xalloc() throw();
     };
        int   ios_base::xalloc() throw()   {
         static _Atomic_word _S_top = 0;
       return __gnu_cxx::__exchange_and_add_dispatch(&_S_top, 1) + 4;
     }
     }

pes delta$ clang++ -O2 ios.cc
ios.cc:4:4: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
ios.cc:6:9: warning: control reaches end of non-void function [-Wreturn-type]
        }
        ^
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file /data/home/rdivacky/llvm/include/llvm/Support/Casting.h,
line 200.
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple x86_64-unknown-
freebsd8.0 -S -disable-free -main-file-name ios.cc -mrelocation-model static -
mdisable-fp-elim -mconstructor-aliases -munwind-tables -target-cpu x86-64 -
resource-dir /usr/local/lib/clang/1.5 -O2 -fmessage-length 116 -fexceptions -
fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-SAAis0.s -
x c++ ios.cc
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Interprocedural Sparse Conditional Constant Propagation'
on module 'ios.cc'.
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
Quuxplusone commented 14 years ago
this was there 1-2 days ago... I cant reproduce with

pes delta$ clang++ -c -emit-llvm ios.cc && llc -O2 ios.o
ios.cc:4:4: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
ios.cc:6:9: warning: control reaches end of non-void function [-Wreturn-type]
        }
        ^
2 diagnostics generated.
pes delta$
Quuxplusone commented 14 years ago

gee... I meant.. this was NOT there 1-2 days ago

Quuxplusone commented 14 years ago

this was caused by r99170