re PR middle-end/27478 (entry and addressable and value-expr: and the gimplifier)
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Tue, 3 Oct 2006 13:44:09 +0000 (13:44 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Tue, 3 Oct 2006 13:44:09 +0000 (13:44 +0000)
PR middle-end/27478

* trans-decl.c (gfc_get_fake_result_decl): Mark var as
TREE_ADDRESSABLE.

* gfortran.dg/entry_8.f90: New test.

From-SVN: r117396

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/entry_8.f90 [new file with mode: 0644]

index 983d892958b14e030efe20ad2a05a4a694984068..cf840a58cc32b42740c104a11690cb58803b1e1a 100644 (file)
@@ -1,19 +1,26 @@
+2006-10-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       PR middle-end/27478
+       * trans-decl.c (gfc_get_fake_result_decl): Mark var as
+       TREE_ADDRESSABLE.
+
 2006-10-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
-    PR fortran/19262
-    * gfortran.h (gfc_option_t): Add max_continue_fixed and max_continue_free.
-    * options.c (gfc_init_options): Initialize fixed form and free form
-    consecutive continuation line limits.
-    * scanner.c (gfc_scanner_init_1): Initialize continue_line
-    and continue_count. (gfc_next_char_literal): Count the number of
-    continuation lines in the current statement and warn if
-    limit is exceeded.
+       PR fortran/19262
+       * gfortran.h (gfc_option_t): Add max_continue_fixed and
+       max_continue_free.
+       * options.c (gfc_init_options): Initialize fixed form and free form
+       consecutive continuation line limits.
+       * scanner.c (gfc_scanner_init_1): Initialize continue_line
+       and continue_count. (gfc_next_char_literal): Count the number of
+       continuation lines in the current statement and warn if limit
+       is exceeded.
 
 2006-10-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
-    PR fortran/19260
-    * scanner.c (gfc_next_char_literal): Add check for missing '&'
-    and warn if in_string, otherwise return ' '.
+       PR fortran/19260
+       * scanner.c (gfc_next_char_literal): Add check for missing '&'
+       and warn if in_string, otherwise return ' '.
 
 2006-10-02  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
index e4c5a5ae5952711ea1666768448f13ad5963f1f6..b3ebffce61a1d71562ceeeac7eddd6b440e7ac62 100644 (file)
@@ -1866,6 +1866,7 @@ gfc_get_fake_result_decl (gfc_symbol * sym, int parent_flag)
       TREE_PUBLIC (decl) = 0;
       TREE_USED (decl) = 1;
       GFC_DECL_RESULT (decl) = 1;
+      TREE_ADDRESSABLE (decl) = 1;
 
       layout_decl (decl, 0);
 
index 1e7bf0101f6bd2e7925a8b39f3a9e505108b8e34..fb05a1535f66e152da6190aa84007323fea0d6aa 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       PR fortran/27478
+       * gfortran.dg/entry_8.f90: New test.
+
 2006-10-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/29291
diff --git a/gcc/testsuite/gfortran.dg/entry_8.f90 b/gcc/testsuite/gfortran.dg/entry_8.f90
new file mode 100644 (file)
index 0000000..02ec2b9
--- /dev/null
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! Check for PR 27478
+      FUNCTION X()
+      ENTRY X1
+      IF (X .GT. 0) CALL FOO(X)
+      IF (Y .GT. 0) CALL FOO(Y)
+      END
+
+      FUNCTION TSL(PIN)
+      ENTRY TSL1(PIN)
+      IF (DBLE(TSL) .GT. PIN) TSL = 705.47
+      TSL= PPP(TSL)
+      END