Hi, due to the bitfield handling changes, C++ frontend now ICEs on this: Cut struct A { unsigned a:8; }; extern void b(unsigned char); void breakme (A f) { b((unsigned char) f.a); } Cut bitfield-ice-1.cc: In function 'void breakme(A)': bitfield-ice-1.cc:7: internal compiler error: in build_c_cast, at cp/typeck.c:5434 Please submit a full bug report, with preprocessed source if appropriate. See <for instructions.
No.1 | | 78 bytes | |
Comment #1 from pinskia at gcc dot gnu dot org 2006-05-07 17:00 Confirmed.
No.2 | | 115 bytes | |
Comment #2 from mueller at gcc dot gnu dot org 2006-05-08 19:54 raising severity because it triggers frequently
No.3 | | 105 bytes | |
Comment #3 from kazu at gcc dot gnu dot org 2006-05-17 20:39 Assigning to Mark Mitchell as he agreed.
No.4 | | 1587 bytes | |
Comment #4 from mmitchel at gcc dot gnu dot org 2006-05-19 03:01 Subject: Bug 27471
Author: mmitchel Date: Fri May 19 03:01:14 2006 New Revision: 113902
URL: Log: PR c++/27471 PR c++/27506 * typeck.c (decay_conversion): Convert bitfields to their declared types here. Improve documentation. Avoid use of cp_convert. (default_conversion): Make it static. Perform integral promotions before lvalue-to-rvalue, function-to-pointer, and array-to-pointer conversions. * init.c (build_init): Remove. (expand_default_init): Do not call rvalue. * call.c (null_ptr_cst_p): Robustify. (build_conditional_expr): Tidy. * except.c (build_throw): Do not perform lvalue-to-rvalue conversion on operand before initializing temporary. * tree.c (convert.h): Include it. (): Use convert_to_integer, not cp_convert. (rvalue): Don't convert bitfields to their declared type here. * cp-tree.h (build_init): Remove. (default_conversion): Likewise. * typeck2.c (build_m_component_ref): Do not perform lvalue-to-rvalue, function-to-pointer, or array-to-pointer conversions here. Correct error message. PR c++/27471 PR c++/27506 * gdg/conversion/bitfield5.C: New test. * gdg/conversion/bitfield6.C: New test.