]> code.ossystems Code Review - openembedded-core.git/blob
64e797835a4f0c14cc8c6c72f0df0006e961bea6
[openembedded-core.git] /
1 Upstream-Status: Inappropriate [Backport]
2 From 20a8b6ba99d25394d9d4b958a8ecc171fe3d263b Mon Sep 17 00:00:00 2001
3 From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
4 Date: Thu, 21 Apr 2011 14:18:54 +0000
5 Subject: [PATCH 161/200]        * gimple.c (walk_gimple_op) <GIMPLE_CALL>: Fix couple of oversights.
6
7 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172829 138bc75d-0d04-0410-961f-82ee72b054a4
8
9 index e60dc92..9a94f06 100644
10 --- a/gcc/gimple.c
11 +++ b/gcc/gimple.c
12 @@ -1405,7 +1405,8 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
13        for (i = 0; i < gimple_call_num_args (stmt); i++)
14         {
15           if (wi)
16 -           wi->val_only = is_gimple_reg_type (gimple_call_arg (stmt, i));
17 +           wi->val_only
18 +             = is_gimple_reg_type (TREE_TYPE (gimple_call_arg (stmt, i)));
19           ret = walk_tree (gimple_call_arg_ptr (stmt, i), callback_op, wi,
20                            pset);
21           if (ret)
22 @@ -1417,7 +1418,8 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
23           if (wi)
24             {
25               wi->is_lhs = true;
26 -             wi->val_only = is_gimple_reg_type (gimple_call_lhs (stmt));
27 +             wi->val_only
28 +               = is_gimple_reg_type (TREE_TYPE (gimple_call_lhs (stmt)));
29             }
30  
31           ret = walk_tree (gimple_call_lhs_ptr (stmt), callback_op, wi, pset);
32 new file mode 100644
33 index 0000000..24527a5
34 --- /dev/null
35 +++ b/gcc/testsuite/gnat.dg/volatile5.adb
36 @@ -0,0 +1,16 @@
37 +-- { dg-do compile }
38 +
39 +with Volatile5_Pkg; use Volatile5_Pkg;
40 +
41 +procedure Volatile5 is
42 +
43 +   A : Rec;
44 +
45 +   procedure Proc is
46 +   begin
47 +      A := F;
48 +   end;
49 +
50 +begin
51 +   Proc;
52 +end;
53 diff --git a/gcc/testsuite/gnat.dg/volatile5_pkg.ads b/gcc/testsuite/gnat.dg/volatile5_pkg.ads
54 new file mode 100644
55 index 0000000..71a0c80
56 --- /dev/null
57 +++ b/gcc/testsuite/gnat.dg/volatile5_pkg.ads
58 @@ -0,0 +1,11 @@
59 +package Volatile5_Pkg is
60 +
61 +   type Rec is record
62 +      I : Integer;
63 +   end record;
64 +   pragma Volatile(Rec);
65 +
66 +  function F return Rec;
67 +
68 +end Volatile5_Pkg;
69 +-- 
70 \ No newline at end of file
71 -- 
72 1.7.0.4
73