Commit 87526ff1 by Janus Weil

re PR fortran/39861 (ICE with INTRINSIC in module: write_symbol(): bad module symbol)

2009-04-24  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/39861
	PR fortran/39864
	* symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
	for the formal arguments.


2009-04-24  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/39861
	PR fortran/39864
	* gfortran.dg/intrinsic_1.f90: New.

From-SVN: r146677
parent e6e15ec9
2009-04-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/39861
PR fortran/39864
* symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
for the formal arguments.
2009-04-21 Taras Glek <tglek@mozilla.com> 2009-04-21 Taras Glek <tglek@mozilla.com>
* f95-lang.c: Update GTY annotations to new syntax. * f95-lang.c: Update GTY annotations to new syntax.
......
...@@ -3865,6 +3865,8 @@ gfc_copy_formal_args_intr (gfc_symbol *dest, gfc_intrinsic_sym *src) ...@@ -3865,6 +3865,8 @@ gfc_copy_formal_args_intr (gfc_symbol *dest, gfc_intrinsic_sym *src)
/* May need to copy more info for the symbol. */ /* May need to copy more info for the symbol. */
formal_arg->sym->ts = curr_arg->ts; formal_arg->sym->ts = curr_arg->ts;
formal_arg->sym->attr.optional = curr_arg->optional; formal_arg->sym->attr.optional = curr_arg->optional;
formal_arg->sym->attr.flavor = FL_VARIABLE;
formal_arg->sym->attr.dummy = 1;
/* If this isn't the first arg, set up the next ptr. For the /* If this isn't the first arg, set up the next ptr. For the
last arg built, the formal_arg->next will never get set to last arg built, the formal_arg->next will never get set to
......
2009-04-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/39861
PR fortran/39864
* gfortran.dg/intrinsic_1.f90: New.
2009-04-24 Eric Botcazou <ebotcazou@adacore.com> 2009-04-24 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/alignment7.adb: New test. * gnat.dg/alignment7.adb: New test.
......
! { dg-do compile }
!
! PR 39861/39864
!
! Test cases provided by Dominique d'Humieres <dominiq@lps.ens.fr>
! and Michael Richmond <michael.a.richmond@nasa.gov>.
module vector_calculus
intrinsic :: dot_product, sqrt
contains
function len(r)
real, dimension(:), intent(in) :: r
real :: len
len = sqrt(dot_product(r,r))
end function len
FUNCTION next_state()
INTRINSIC :: RESHAPE
INTEGER, PARAMETER :: trantb(1,1) = RESHAPE((/1,2/), shape=(/1,1/))
next_state = trantb(1, 1)
END FUNCTION next_state
end module vector_calculus
! { dg-final { cleanup-modules "vector_calculus" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment