re PR c++/46304 (g++ crashes with ICE in bitmap_first_set_bit, at bitmap.c:770)
PR c++/46304 * typeck.c (cp_build_binary_op): Fold COMPLEX_EXPR. From-SVN: r172754
This commit is contained in:
parent
b48de48389
commit
68a29e1cf4
@ -1,5 +1,8 @@
|
||||
2011-04-19 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/46304
|
||||
* typeck.c (cp_build_binary_op): Fold COMPLEX_EXPR.
|
||||
|
||||
PR c++/45267
|
||||
* decl.c (duplicate_decls): Keep always_inline attribute
|
||||
in sync with DECL_DISREGARD_INLINE_LIMITS.
|
||||
|
@ -4357,7 +4357,11 @@ cp_build_binary_op (location_t location,
|
||||
gcc_unreachable();
|
||||
}
|
||||
}
|
||||
return build2 (COMPLEX_EXPR, result_type, real, imag);
|
||||
real = fold_if_not_in_template (real);
|
||||
imag = fold_if_not_in_template (imag);
|
||||
result = build2 (COMPLEX_EXPR, result_type, real, imag);
|
||||
result = fold_if_not_in_template (result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* For certain operations (which identify themselves by shorten != 0)
|
||||
|
@ -1,5 +1,7 @@
|
||||
2011-04-19 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/ext/complex7.C: New.
|
||||
|
||||
* g++.dg/ext/attrib41.C: New.
|
||||
|
||||
2011-04-19 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
6
gcc/testsuite/g++.dg/ext/complex7.C
Normal file
6
gcc/testsuite/g++.dg/ext/complex7.C
Normal file
@ -0,0 +1,6 @@
|
||||
// { dg-options "" }
|
||||
|
||||
class A
|
||||
{
|
||||
static const _Complex double x = 1.0 + 2.0i;
|
||||
};
|
Loading…
Reference in New Issue
Block a user