aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-04-21 14:15:51 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-04-21 14:15:51 +0000
commit4d931f416b5965da48263badb0822b3dbba190d7 (patch)
tree5e39227a3a423de35133f83f1f9afaea610a8ae1 /gcc
parent3b6e9676fe13ef1fb9f362091ab7a8737adc8e75 (diff)
downloadgcc-4d931f416b5965da48263badb0822b3dbba190d7.zip
gcc-4d931f416b5965da48263badb0822b3dbba190d7.tar.gz
gcc-4d931f416b5965da48263badb0822b3dbba190d7.tar.bz2
* gimple.c (walk_gimple_op) <GIMPLE_CALL>: Fix couple of oversights.
From-SVN: r172828
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/gimple.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gnat.dg/volatile5.adb16
-rw-r--r--gcc/testsuite/gnat.dg/volatile5_pkg.ads11
5 files changed, 40 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f520815..34492bb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gimple.c (walk_gimple_op) <GIMPLE_CALL>: Fix couple of oversights.
+
2011-04-21 Richard Guenther <rguenther@suse.de>
* Makefile.in (site.exp): Do not use tmp0 but site.tmp as temporary
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 909091b..0d28c1b 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 5319846..89541ba 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/volatile5.adb: New test.
+ * gnat.dg/volatile5_pkg.ads: New helper.
+
2011-04-21 Uros Bizjak <ubizjak@gmail.com>
PR target/48708
diff --git a/gcc/testsuite/gnat.dg/volatile5.adb b/gcc/testsuite/gnat.dg/volatile5.adb
new file mode 100644
index 0000000..24527a5
--- /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 0000000..71a0c80
--- /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