OSDN Git Service

fortran/
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Aug 2009 00:27:52 +0000 (00:27 +0000)
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Aug 2009 00:27:52 +0000 (00:27 +0000)
        PR fortran/40660
        * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
        (transfer_array_desc): Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151069 138bc75d-0d04-0410-961f-82ee72b054a4

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

index a5e5b44..0573336 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-24  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR fortran/40660
+       * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
+       (transfer_array_desc): Same.
+
 2009-08-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/35754
@@ -41,6 +47,7 @@
        in both modes to handle consecutive single quotes.
        Test for extra characters in fmt, issue warning.
 
+>>>>>>> .r151068
 2009-08-21  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/41106
index 0f6e0a5..690464e 100644 (file)
@@ -1802,7 +1802,7 @@ build_dt (tree function, gfc_code * code)
     set_parameter_const (&block, var, IOPARM_common_flags, mask);
 
   tmp = gfc_build_addr_expr (NULL_TREE, var);
-  tmp = build_call_expr_loc (input_location,
+  tmp = build_call_expr_loc (UNKNOWN_LOCATION,
                         function, 1, tmp);
   gfc_add_expr_to_block (&block, tmp);
 
@@ -2146,7 +2146,7 @@ transfer_array_desc (gfc_se * se, gfc_typespec * ts, tree addr_expr)
   kind_arg = build_int_cst (NULL_TREE, ts->kind);
 
   tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
-  tmp = build_call_expr_loc (input_location,
+  tmp = build_call_expr_loc (UNKNOWN_LOCATION,
                         iocall[IOCALL_X_ARRAY], 4,
                         tmp, addr_expr, kind_arg, charlen_arg);
   gfc_add_expr_to_block (&se->pre, tmp);
diff --git a/gcc/testsuite/gfortran.dg/PR40660.f90 b/gcc/testsuite/gfortran.dg/PR40660.f90
new file mode 100644 (file)
index 0000000..a269ca3
--- /dev/null
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original-lineno" }
+!
+! PR fortran/40660
+
+PROGRAM test
+  INTEGER, DIMENSION(3) :: a1,a2
+  a1 = 1
+  PRINT*, a1
+  a2 = 2
+end program test
+
+! { dg-final { scan-tree-dump-times ": 3\] _gfortran" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+