PR fortran/64528
* trans-decl.c (create_function_arglist): Don't set TREE_READONLY
on dummy args with VALUE attribute.
* gfortran.dg/pr64528.f90: New test.
From-SVN: r219543
+2015-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/64528
+ * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
+ on dummy args with VALUE attribute.
+
2015-01-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/63733
/* Fill in arg stuff. */
DECL_CONTEXT (parm) = fndecl;
DECL_ARG_TYPE (parm) = TREE_VALUE (typelist);
- /* All implementation args are read-only. */
- TREE_READONLY (parm) = 1;
+ /* All implementation args except for VALUE are read-only. */
+ if (!f->sym->attr.value)
+ TREE_READONLY (parm) = 1;
if (POINTER_TYPE_P (type)
&& (!f->sym->attr.proc_pointer
&& f->sym->attr.flavor != FL_PROCEDURE))
+2015-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/64528
+ * gfortran.dg/pr64528.f90: New test.
+
2015-01-13 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/subsp.c: New test.
--- /dev/null
+! PR fortran/64528
+! { dg-do compile }
+! { dg-options "-O -fno-tree-dce -fno-tree-ccp" }
+
+program pr64528
+ interface
+ subroutine foo(x)
+ integer, value :: x
+ end subroutine foo
+ end interface
+ integer :: x
+ x = 10
+ call foo(x)
+ if(x .ne. 10) then
+ endif
+end program pr64528
+subroutine foo(x)
+ integer, value :: x
+ x = 11
+end subroutine foo