From: Eric Botcazou Date: Thu, 21 Apr 2011 14:15:51 +0000 (+0000) Subject: * gimple.c (walk_gimple_op) : Fix couple of oversights. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d931f416b5965da48263badb0822b3dbba190d7;p=gcc.git * gimple.c (walk_gimple_op) : Fix couple of oversights. From-SVN: r172828 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f52081501bf..34492bba7a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-04-21 Eric Botcazou + + * gimple.c (walk_gimple_op) : Fix couple of oversights. + 2011-04-21 Richard Guenther * Makefile.in (site.exp): Do not use tmp0 but site.tmp as temporary diff --git a/gcc/gimple.c b/gcc/gimple.c index 909091bcfd0..0d28c1b2738 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1464,7 +1464,8 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, for (i = 0; i < gimple_call_num_args (stmt); i++) { if (wi) - wi->val_only = is_gimple_reg_type (gimple_call_arg (stmt, i)); + wi->val_only + = is_gimple_reg_type (TREE_TYPE (gimple_call_arg (stmt, i))); ret = walk_tree (gimple_call_arg_ptr (stmt, i), callback_op, wi, pset); if (ret) @@ -1476,7 +1477,8 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, if (wi) { wi->is_lhs = true; - wi->val_only = is_gimple_reg_type (gimple_call_lhs (stmt)); + wi->val_only + = is_gimple_reg_type (TREE_TYPE (gimple_call_lhs (stmt))); } ret = walk_tree (gimple_call_lhs_ptr (stmt), callback_op, wi, pset); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 53198469345..89541bad741 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-04-21 Eric Botcazou + + * gnat.dg/volatile5.adb: New test. + * gnat.dg/volatile5_pkg.ads: New helper. + 2011-04-21 Uros Bizjak PR target/48708 diff --git a/gcc/testsuite/gnat.dg/volatile5.adb b/gcc/testsuite/gnat.dg/volatile5.adb new file mode 100644 index 00000000000..24527a50004 --- /dev/null +++ b/gcc/testsuite/gnat.dg/volatile5.adb @@ -0,0 +1,16 @@ +-- { dg-do compile } + +with Volatile5_Pkg; use Volatile5_Pkg; + +procedure Volatile5 is + + A : Rec; + + procedure Proc is + begin + A := F; + end; + +begin + Proc; +end; diff --git a/gcc/testsuite/gnat.dg/volatile5_pkg.ads b/gcc/testsuite/gnat.dg/volatile5_pkg.ads new file mode 100644 index 00000000000..71a0c8046a3 --- /dev/null +++ b/gcc/testsuite/gnat.dg/volatile5_pkg.ads @@ -0,0 +1,11 @@ +package Volatile5_Pkg is + + type Rec is record + I : Integer; + end record; + pragma Volatile(Rec); + + function F return Rec; + +end Volatile5_Pkg; +-- \ No newline at end of file