Command line: gcc testcase.c --------- testcase.c --------- int foo(int i) { i ? : (void *){}; } ------------------------------
Output - 4.5 r157122, checking: $ /mnt/svn/gcc-trunk/binary-157122/bin/gcc testcase.c testcase.c: In function 'foo': testcase.c:3:3: error: empty scalar initializer testcase.c:3:3: error: (near initialization for '(anonymous)') testcase.c:3:7: warning: pointer/integer type mismatch in conditional expression testcase.c:3:7: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1233 Output - 4.4 r157120, checking: $ /mnt/svn/gcc-4_4/binary-157120-enable-checking/bin/gcc testcase.c testcase.c: In function 'foo': testcase.c:3: error: empty scalar initializer testcase.c:3: error: (near initialization for '(anonymous)') testcase.c:3: warning: pointer/integer type mismatch in conditional expression testcase.c:3: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_types_compatible_p, at c-objc-common.c:190 Output - 4.5 r157122, disabled checking: $ gcc-4.5.0-alpha20100225 testcase.c testcase.c: In function 'foo': testcase.c:3:3: error: empty scalar initializer testcase.c:3:3: error: (near initialization for '(anonymous)') testcase.c:3:7: warning: pointer/integer type mismatch in conditional expression testcase.c:3: confused by earlier errors, bailing out Output - 4.4.3, disabled checking: $ gcc-4.4.3 testcase.c testcase.c: In function 'foo': testcase.c:3: error: empty scalar initializer testcase.c:3: error: (near initialization for '(anonymous)') testcase.c:3: warning: pointer/integer type mismatch in conditional expression testcase.c:3: confused by earlier errors, bailing out Output - 4.3.4, disabled checking: $ gcc-4.3.4 testcase.c testcase.c: In function 'foo': testcase.c:3: error: empty scalar initializer testcase.c:3: error: (near initialization for '(anonymous)') testcase.c:3: warning: pointer/integer type mismatch in conditional expression It is probably different problem than pr43082, 4.4 ICEs at different place. I don't have any 4.3 build with checking to test. -- Summary: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1233 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43248