re PR middle-end/90194 (ICE in expand_debug_expr, at cfgexpand.c:5244)
2019-04-25 Richard Biener <rguenther@suse.de> PR middle-end/90194 * match.pd: Add pattern to simplify view-conversion of an empty constructor. * g++.dg/torture/pr90194.C: New testcase. From-SVN: r270569
This commit is contained in:
parent
9168f22057
commit
f469220df6
4 changed files with 36 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2019-04-25 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/90194
|
||||
* match.pd: Add pattern to simplify view-conversion of an
|
||||
empty constructor.
|
||||
|
||||
2019-04-24 Clement Chigot <clement.chigot@atos.net>
|
||||
|
||||
* config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Disable
|
||||
|
|
|
@ -2596,6 +2596,13 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
|
|||
&& TYPE_UNSIGNED (TREE_TYPE (@1)))))
|
||||
(view_convert @1)))
|
||||
|
||||
/* Simplify a view-converted empty constructor. */
|
||||
(simplify
|
||||
(view_convert CONSTRUCTOR@0)
|
||||
(if (TREE_CODE (@0) != SSA_NAME
|
||||
&& CONSTRUCTOR_NELTS (@0) == 0)
|
||||
{ build_zero_cst (type); }))
|
||||
|
||||
/* Re-association barriers around constants and other re-association
|
||||
barriers can be removed. */
|
||||
(simplify
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2019-04-25 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/90194
|
||||
* g++.dg/torture/pr90194.C: New testcase.
|
||||
|
||||
2019-04-24 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/90236
|
||||
|
|
18
gcc/testsuite/g++.dg/torture/pr90194.C
Normal file
18
gcc/testsuite/g++.dg/torture/pr90194.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
// { dg-do compile }
|
||||
// { dg-additional-options "-g" }
|
||||
|
||||
struct cb {
|
||||
int yr;
|
||||
};
|
||||
|
||||
void *
|
||||
operator new (__SIZE_TYPE__, void *nq)
|
||||
{
|
||||
return nq;
|
||||
}
|
||||
|
||||
void
|
||||
af (int xn)
|
||||
{
|
||||
new (&xn) cb { };
|
||||
}
|
Loading…
Add table
Reference in a new issue