[patch] Fix ICE in rtl_for_decl_init

Eric Botcazou ebotcazou@adacore.com
Wed Dec 15 14:22:00 GMT 2010


Hi,

the attached testcase causes the compiler to ICE in rtl_for_decl_init when it 
is trying to generate debug info for the constant C.  The INIT expression is
  NOP_EXPR<const type> (VIEW_CONVERT_EXPR<type> (CONSTRUCTOR))
with type a scalar type.  The code in rtl_for_decl_init already knows how to 
skip aggregate types, but it doesn't see the inner CONSTRUCTOR.

Bootstrapped/regtested on x86_64-suse-linux, OK for the mainline?


2010-12-15  Eric Botcazou  <ebotcazou@adacore.com>

	* dwarf2out.c (rtl_for_decl_init): Strip no-op conversions off the
	initializer.  Skip view conversions from aggregate types.


2010-12-15  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/unchecked_convert8.ad[sb]: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 1013 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101215/52792d49/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unchecked_convert8.ads
Type: text/x-adasrc
Size: 76 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101215/52792d49/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unchecked_convert8.adb
Type: text/x-adasrc
Size: 631 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101215/52792d49/attachment-0002.bin>


More information about the Gcc-patches mailing list