mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-24 23:56:05 +08:00
tree-sra.c (decide_block_copy): Decide if there are groups.
* tree-sra.c (decide_block_copy): Decide if there are groups. From-SVN: r128602
This commit is contained in:
parent
e59d83aa39
commit
34c0750b24
@ -1,3 +1,7 @@
|
||||
2007-09-19 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* tree-sra.c (decide_block_copy): Decide if there are groups.
|
||||
|
||||
2007-09-19 Roman Zippel <zippel@linux-m68k.org>
|
||||
|
||||
* config/m68k/m68k.c (output_move_himode): Remove jump table
|
||||
|
@ -1,3 +1,7 @@
|
||||
2007-09-19 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/slice2.ad[sb]: New testcase.
|
||||
|
||||
2007-09-19 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* gcc.dg/cpp/assert4.c: Fix expected h8300 preprocessor define.
|
||||
|
13
gcc/testsuite/gnat.dg/slice2.adb
Normal file
13
gcc/testsuite/gnat.dg/slice2.adb
Normal file
@ -0,0 +1,13 @@
|
||||
-- { dg-do compile }
|
||||
-- { dg-options "-O" }
|
||||
|
||||
package body Slice2 is
|
||||
|
||||
function F (I : R1) return R2 is
|
||||
Val : R2;
|
||||
begin
|
||||
Val.Text (1 .. 8) := I.Text (1 .. 8);
|
||||
return Val;
|
||||
end F;
|
||||
|
||||
end Slice2;
|
14
gcc/testsuite/gnat.dg/slice2.ads
Normal file
14
gcc/testsuite/gnat.dg/slice2.ads
Normal file
@ -0,0 +1,14 @@
|
||||
package Slice2 is
|
||||
|
||||
type R1 is record
|
||||
Text : String (1 .. 30);
|
||||
end record;
|
||||
|
||||
type R2 is record
|
||||
Text : String (1 .. 8);
|
||||
B : Boolean := True;
|
||||
end record;
|
||||
|
||||
function F (I : R1) return R2;
|
||||
|
||||
end Slice2;
|
@ -1491,8 +1491,8 @@ decide_block_copy (struct sra_elt *elt)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Don't decide if we've no uses. */
|
||||
if (elt->n_uses == 0 && elt->n_copies == 0)
|
||||
/* Don't decide if we've no uses and no groups. */
|
||||
if (elt->n_uses == 0 && elt->n_copies == 0 && elt->groups == NULL)
|
||||
;
|
||||
|
||||
else if (!elt->is_scalar)
|
||||
|
Loading…
Reference in New Issue
Block a user