re PR c++/26140 (ice on valid C++ code)

2006-02-07  Richard Guenther  <rguenther@suse.de>

	PR c++/26140
	Revert
	2006-01-30  Richard Guenther  <rguenther@suse.de>
 	PR c++/23372
 	* gimplify.c (gimplify_target_expr): Handle easy cases
 	without creating a temporary.

	Revert
	2006-01-30  Richard Guenther  <rguenther@suse.de>
 	PR c++/23372
 	* gcc.dg/pr23372-1.C: New testcase.

	* g++.dg/tree-ssa/pr26140.C: New testcase.

From-SVN: r110699
This commit is contained in:
Richard Guenther 2006-02-07 15:36:44 +00:00 committed by Richard Biener
parent 774b9d213a
commit 328654cc92
5 changed files with 34 additions and 19 deletions

View file

@ -1,3 +1,12 @@
2006-02-07 Richard Guenther <rguenther@suse.de>
PR c++/26140
Revert
2006-01-30 Richard Guenther <rguenther@suse.de>
PR c++/23372
* gimplify.c (gimplify_target_expr): Handle easy cases
without creating a temporary.
2006-02-07 Pete Steinmetz <steinmtz@us.ibm.com>
* sched-rgn.c (compute_dom_prob_ps, compute_trg_info): Eradicate

View file

@ -4056,15 +4056,6 @@ gimplify_target_expr (tree *expr_p, tree *pre_p, tree *post_p)
if (init)
{
/* Try to avoid the temporary if possible. */
if (TREE_CODE (init) == INDIRECT_REF
&& !TREE_SIDE_EFFECTS (init)
&& !TARGET_EXPR_CLEANUP (targ))
{
*expr_p = init;
return GS_OK;
}
/* TARGET_EXPR temps aren't part of the enclosing block, so add it
to the temps list. */
gimple_add_tmp_var (temp);

View file

@ -1,3 +1,13 @@
2006-02-07 Richard Guenther <rguenther@suse.de>
PR c++/26140
Revert
2006-01-30 Richard Guenther <rguenther@suse.de>
PR c++/23372
* gcc.dg/pr23372-1.C: New testcase.
* g++.dg/tree-ssa/pr26140.C: New testcase.
2006-02-07 Mark Mitchell <mark@codesourcery.com>
PR c++/9737

View file

@ -0,0 +1,15 @@
/* { dg-do compile } */
struct Pitch
{
int notename_;
};
struct Audio_note
{
Audio_note (Pitch p);
};
void create_audio_elements ()
{
Pitch *pit;
new Audio_note (*pit);
}

View file

@ -1,10 +0,0 @@
/* { dg-do compile } */
/* { dg-options "-Os" } */
struct A {
int a[1000];
};
void f(struct A);
void g(struct A *a) { f(*a); }
/* { dg-final { scan-assembler-times "memcpy" 1 } } */