From 5c4a1c7b20dfd908f43951e16ff2679a4b184d1a Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 6 Jun 2011 10:32:11 +0000 Subject: [PATCH] utils2.c (gnat_stabilize_reference): Fix thinko. * gcc-interface/utils2.c (gnat_stabilize_reference) : Fix thinko. From-SVN: r174690 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/utils2.c | 4 ++-- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gnat.dg/specs/cond_expr1.ads | 9 +++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gnat.dg/specs/cond_expr1.ads diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6587ffd9a0b..ac770864de1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2011-06-06 Eric Botcazou + + * gcc-interface/utils2.c (gnat_stabilize_reference) : + Fix thinko. + 2011-06-06 Eric Botcazou * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index db190327122..2a455d1047e 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -2518,8 +2518,8 @@ gnat_stabilize_reference (tree ref, bool force, bool *success) result = build2 (COMPOUND_EXPR, type, gnat_stabilize_reference (TREE_OPERAND (ref, 0), force, success), - gnat_stabilize_reference_1 (TREE_OPERAND (ref, 1), - force)); + gnat_stabilize_reference (TREE_OPERAND (ref, 1), force, + success)); break; case CONSTRUCTOR: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 131da5e7743..1e904e60485 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-06-06 Eric Botcazou + + * gnat.dg/specs/cond_expr1.ads: New test. + 2011-06-06 Eric Botcazou * gnat.dg/deferred_const4.ad[sb]: New test. diff --git a/gcc/testsuite/gnat.dg/specs/cond_expr1.ads b/gcc/testsuite/gnat.dg/specs/cond_expr1.ads new file mode 100644 index 00000000000..01d76d028e8 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/cond_expr1.ads @@ -0,0 +1,9 @@ +-- { dg-do compile } +-- { dg-options "-gnat12 -gnato" } + +package Cond_Expr1 is + + function Tail (S : String) return String is + (if S'Last <= S'First then "" else S (S'First + 1 .. S'Last)); + +end Cond_Expr1; -- 2.30.2