With current trunk (revision 140100): (sid)1092:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/gcc -c dovecot-failures.i failures.c: In function 'i_set_panic_handler': failures.c:242: error: type mismatch in address expression void (*<T678>) (const char *, struct *) void (*<Tab6>) (const char *, struct *) callback = default_panic_handler; failures.c:242: internal compiler error: verify_gimple failed Please submit a full bug report,
Created attachment 16252 [details] Preprocessed code
Reducing ...
Reduced testcase: typedef void failure_callback_t(int); void default_panic_handler(int args)__attribute__((noreturn)); void i_set_panic_handler(failure_callback_t *callback __attribute__((noreturn))) { callback = default_panic_handler; }
This is IMHO a C FE bug (works with C++ just fine and the MODIFY_EXPR with non-useless type conversion between LHS and RHS type is created by the C FE).
*** Bug 37467 has been marked as a duplicate of this bug. ***
Working on a patch. It's not a MODIFY_EXPR but an ADDR_EXPR with problematic conversion.
*** Bug 37510 has been marked as a duplicate of this bug. ***
Looks like I taked over ...
Fixed.
Subject: Bug 37418 Author: rguenth Date: Thu Oct 16 08:19:49 2008 New Revision: 141165 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141165 Log: 2008-10-16 Joseph Myers <joseph@codesourcery.com> Richard Guenther <rguenther@suse.de> PR middle-end/37418 * tree-ssa.c (useless_type_conversion_p_1): Do not treat volatile qualified functions or methods as relevant. * gcc.c-torture/compile/pr37418-1.c, gcc.c-torture/compile/pr37418-2.c, gcc.c-torture/compile/pr37418-3.c, gcc.c-torture/compile/pr37418-4.c: New tests. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr37418-1.c trunk/gcc/testsuite/gcc.c-torture/compile/pr37418-2.c trunk/gcc/testsuite/gcc.c-torture/compile/pr37418-3.c trunk/gcc/testsuite/gcc.c-torture/compile/pr37418-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa.c