PR fortran/14771
* arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
* expr.c (check_intrinsic_op): Likewise.
* module.c (mio_expr): Likewise.
testsuite/
PR fortran/14771
* gfortran.dg/parens_4.f90: New.
* gfortran.dg/parens_5.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110840
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-02-10 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/14771
+ * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
+ * expr.c (check_intrinsic_op): Likewise.
+ * module.c (mio_expr): Likewise.
+
2006-02-09 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
* dump-parse-tree.c: Update copyright years.
unary = 1;
break;
+ case INTRINSIC_PARENTHESES:
+ temp.ts = op1->ts;
+
+ unary = 1;
+ break;
+
case INTRINSIC_GE:
case INTRINSIC_LT: /* Additional restrictions */
case INTRINSIC_LE: /* for ordering relations. */
break;
+ case INTRINSIC_PARENTHESES:
+ break;
+
default:
gfc_error ("Only intrinsic operators can be used in expression at %L",
&e->where);
case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS:
case INTRINSIC_NOT:
+ case INTRINSIC_PARENTHESES:
mio_expr (&e->value.op.op1);
break;
+2006-02-10 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/14771
+ * gfortran.dg/parens_4.f90: New.
+ * gfortran.dg/parens_5.f90: New.
+
2006-02-10 Richard Guenther <rguenther@suse.de>
* testsuite/gcc.dg/pr23372-1.c: Remove empty file.
--- /dev/null
+! { dg-do compile }
+! Fallout from the patch for PR 14771
+! Testcase by Erik Zeek
+program test
+ call bob(5)
+contains
+ subroutine bob(n)
+ integer, intent(in) :: n
+ character(len=n) :: temp1
+ character(len=(n)) :: temp2 ! Fails here
+ end subroutine bob
+end program test
--- /dev/null
+! { dg-do run }
+! Another case of fallout from the original patch for PR14771
+! Testcase by Erik Zeek
+module para
+contains
+ function bobo(n)
+ integer, intent(in) :: n
+ character(len=(n)) :: bobo ! Used to fail here
+ bobo = "1234567890"
+ end function bobo
+end module para
+
+program test
+ use para
+ implicit none
+ character*5 c
+ c = bobo(5)
+ if (c .ne. "12345") call abort
+end program test