Testcase
"test-ice.cpp"
#include <iostream>
#include <emmintrin.h>
const __m128i tmp={0,0};
g++ -O3 -g -c -msse2 test-ice.cpp
I get the following error:
test-ice.cpp:5: internal compiler error: in rtl_for_decl_init, at
dwarf2out.c:10071
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
It compiles fine with "-g" option. This issue is there even in 4.3 mainline as
well.
I tracked this problem to this patch
(http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01567.html).
Using the following temporary patch fixes this issue. I was basically reverting
the line which causes this issue.
--- dwarf2out.c.orig 2007-07-25 10:29:24.790178000 -0500
+++ dwarf2out.c 2007-07-25 10:21:41.378252000 -0500
@@ -10065,8 +10065,8 @@ rtl_for_decl_init (tree init, tree type)
immediate RTL constant, expand it now. We must be careful not to
reference variables which won't be output. */
- else if (initializer_constant_valid_p (init, type)
- && ! walk_tree (&init, reference_to_unused,NULL,NULL)
+ else if ((INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type))
+ && initializer_constant_valid_p (init, type))
{
rtl = expand_expr (init, NULL_RTX, VOIDmode, EXPAND_INITIALIZER);
Thanks,
- Dwarak
--
Summary: ICE with -g option
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dwarak dot rajagopal at amd dot com
GCC build triplet: x86_64
GCC host triplet: x86_64
GCC target triplet: x86_64
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32914