From c4c3cd53e2ffe277ddefbd2c56f52635afdde89d Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Thu, 10 Jul 2014 10:38:30 +0000 Subject: [PATCH] PR middle-end/53590 * function.c (allocate_struct_function): Revert r188667 change. * gimple-low.c (lower_builtin_setjmp): Use properly-typed constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212424 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/function.c | 1 + gcc/gimple-low.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gnat.dg/opt39.adb | 31 +++++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gnat.dg/opt39.adb diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc76db4051c..075aa789171 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-07-10 Eric Botcazou + + PR middle-end/53590 + * function.c (allocate_struct_function): Revert r188667 change. + + * gimple-low.c (lower_builtin_setjmp): Use properly-typed constant. + 2014-07-10 Tom G. Christensen * doc/install.texi: Remove links to defunct package providers for diff --git a/gcc/function.c b/gcc/function.c index a0a3bc7526b..922ef3d7b2f 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4549,6 +4549,7 @@ allocate_struct_function (tree fndecl, bool abstract_p) /* ??? This could be set on a per-function basis by the front-end but is this worth the hassle? */ cfun->can_throw_non_call_exceptions = flag_non_call_exceptions; + cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions; } } diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c index 6a5b2e1f4b2..c8a6e6b57fb 100644 --- a/gcc/gimple-low.c +++ b/gcc/gimple-low.c @@ -720,7 +720,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi) these builtins are modelled as non-local label jumps to the label that is passed to these two builtins, so pretend we have a non-local label during GIMPLE passes too. See PR60003. */ - cfun->has_nonlocal_label = true; + cfun->has_nonlocal_label = 1; /* NEXT_LABEL is the label __builtin_longjmp will jump to. Its address is passed to both __builtin_setjmp_setup and __builtin_setjmp_receiver. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9542f4fa33..054497b27a9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-07-10 Eric Botcazou + + * gnat.dg/opt39.adb: New test. + 2014-07-10 Yuri Rumyantsev PR tree-optimization/61742 diff --git a/gcc/testsuite/gnat.dg/opt39.adb b/gcc/testsuite/gnat.dg/opt39.adb new file mode 100644 index 00000000000..a00cac75fb5 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt39.adb @@ -0,0 +1,31 @@ +-- { dg-do compile } +-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" } + +procedure Opt39 (I : Integer) is + + type Rec is record + I1 : Integer; + I2 : Integer; + I3 : Integer; + I4 : Integer; + I5 : Integer; + end record; + + procedure Set (A : access Rec; I : Integer) is + Tmp : Rec := A.all; + begin + Tmp.I1 := I; + A.all := Tmp; + end; + + R : aliased Rec; + +begin + Set (R'Access, I); + if R.I1 /= I then + raise Program_Error; + end if; +end; + +-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } +-- { dg-final { cleanup-tree-dump "optimized" } } -- 2.11.4.GIT