View | Details | Return to bug 36325 | Differences between
and this patch

Collapse All | Expand All

(-)gcc/testsuite/gfortran.dg/gomp/reduction3.f90 (-5 lines)
Lines 33-43 subroutine f2 Link Here
33
end subroutine f2
33
end subroutine f2
34
subroutine f3
34
subroutine f3
35
  integer :: i
35
  integer :: i
36
  interface
37
    function ior (a, b)
38
      integer :: ior, a, b
39
    end function
40
  end interface
41
  intrinsic ior
36
  intrinsic ior
42
  i = 6
37
  i = 6
43
!$omp parallel reduction (ior:i)
38
!$omp parallel reduction (ior:i)
(-)gcc/testsuite/gfortran.dg/external_procedures_1.f90 (-2 / +2 lines)
Lines 24-30 program main Link Here
24
  interface
24
  interface
25
    function ext1 (y)
25
    function ext1 (y)
26
      real ext1, y
26
      real ext1, y
27
      external ext1  ! { dg-error "EXTERNAL attribute conflicts with FUNCTION" }
27
      external ext1  ! { dg-error "Duplicate EXTERNAL attribute" }
28
    end function ext1
28
    end function ext1
29
  end interface
29
  end interface
30
  inval = 1.0
30
  inval = 1.0
Lines 38-41 contains Link Here
38
    inv = y * y * y
38
    inv = y * y * y
39
  end function inv
39
  end function inv
40
end program main
40
end program main
41
41
(-)gcc/fortran/interface.c (-2 / +1 lines)
Lines 2421-2428 gfc_procedure_use (gfc_symbol *sym, gfc_ Link Here
2421
	}
2421
	}
2422
    }
2422
    }
2423
2423
2424
  if (sym->attr.external
2424
  if (sym->attr.if_source == IFSRC_UNKNOWN)
2425
      || sym->attr.if_source == IFSRC_UNKNOWN)
2426
    {
2425
    {
2427
      gfc_actual_arglist *a;
2426
      gfc_actual_arglist *a;
2428
      for (a = *ap; a; a = a->next)
2427
      for (a = *ap; a; a = a->next)
(-)gcc/fortran/symbol.c (-2 / +5 lines)
Lines 434-445 check_conflict (symbol_attribute *attr, Link Here
434
434
435
  conf (target, external);
435
  conf (target, external);
436
  conf (target, intrinsic);
436
  conf (target, intrinsic);
437
  conf (external, dimension);   /* See Fortran 95's R504.  */
437
438
  if (!attr->if_source)
439
    conf (external, dimension);   /* See Fortran 95's R504.  */
438
440
439
  conf (external, intrinsic);
441
  conf (external, intrinsic);
440
  conf (entry, intrinsic);
442
  conf (entry, intrinsic);
441
443
442
  if ((attr->if_source && !attr->procedure) || attr->contained)
444
  if ((attr->if_source == IFSRC_DECL && !attr->procedure) || attr->contained)
443
    {
445
    {
444
      conf (external, subroutine);
446
      conf (external, subroutine);
445
      conf (external, function);
447
      conf (external, function);
Lines 3664-3669 copy_formal_args (gfc_symbol *dest, gfc_ Link Here
3664
      /* May need to copy more info for the symbol.  */
3666
      /* May need to copy more info for the symbol.  */
3665
      formal_arg->sym->attr = curr_arg->sym->attr;
3667
      formal_arg->sym->attr = curr_arg->sym->attr;
3666
      formal_arg->sym->ts = curr_arg->sym->ts;
3668
      formal_arg->sym->ts = curr_arg->sym->ts;
3669
      formal_arg->sym->as = gfc_copy_array_spec (curr_arg->sym->as);
3667
3670
3668
      /* If this isn't the first arg, set up the next ptr.  For the
3671
      /* If this isn't the first arg, set up the next ptr.  For the
3669
        last arg built, the formal_arg->next will never get set to
3672
        last arg built, the formal_arg->next will never get set to
(-)gcc/fortran/resolve.c (-3 / +5 lines)
Lines 1571-1577 resolve_specific_f0 (gfc_symbol *sym, gf Link Here
1571
      /* Existance of isym should be checked already.  */
1571
      /* Existance of isym should be checked already.  */
1572
      gcc_assert (isym);
1572
      gcc_assert (isym);
1573
1573
1574
      sym->ts = isym->ts;
1574
      sym->ts.type = isym->ts.type;
1575
      sym->ts.kind = isym->ts.kind;
1575
      sym->attr.function = 1;
1576
      sym->attr.function = 1;
1576
      sym->attr.proc = PROC_EXTERNAL;
1577
      sym->attr.proc = PROC_EXTERNAL;
1577
      goto found;
1578
      goto found;
Lines 2646-2653 resolve_specific_s0 (gfc_code *c, gfc_sy Link Here
2646
      /* Existance of isym should be checked already.  */
2647
      /* Existance of isym should be checked already.  */
2647
      gcc_assert (isym);
2648
      gcc_assert (isym);
2648
2649
2649
      sym->ts = isym->ts;
2650
      sym->ts.type = isym->ts.type;
2650
      sym->attr.function = 1;
2651
      sym->ts.kind = isym->ts.kind;
2652
      sym->attr.subroutine = 1;
2651
      goto found;
2653
      goto found;
2652
    }
2654
    }
2653
2655
(-)gcc/fortran/parse.c (+16 lines)
Lines 1917-1928 loop: Link Here
1917
      new_state = COMP_SUBROUTINE;
1917
      new_state = COMP_SUBROUTINE;
1918
      gfc_add_explicit_interface (gfc_new_block, IFSRC_IFBODY,
1918
      gfc_add_explicit_interface (gfc_new_block, IFSRC_IFBODY,
1919
				  gfc_new_block->formal, NULL);
1919
				  gfc_new_block->formal, NULL);
1920
      if (current_interface.type != INTERFACE_ABSTRACT &&
1921
	 !gfc_new_block->attr.dummy &&
1922
	 gfc_add_external (&gfc_new_block->attr, &gfc_current_locus) == FAILURE)
1923
	{
1924
	  reject_statement ();
1925
	  gfc_free_namespace (gfc_current_ns);
1926
	  goto loop;
1927
	}
1920
      break;
1928
      break;
1921
1929
1922
    case ST_FUNCTION:
1930
    case ST_FUNCTION:
1923
      new_state = COMP_FUNCTION;
1931
      new_state = COMP_FUNCTION;
1924
      gfc_add_explicit_interface (gfc_new_block, IFSRC_IFBODY,
1932
      gfc_add_explicit_interface (gfc_new_block, IFSRC_IFBODY,
1925
				  gfc_new_block->formal, NULL);
1933
				  gfc_new_block->formal, NULL);
1934
      if (current_interface.type != INTERFACE_ABSTRACT &&
1935
	 !gfc_new_block->attr.dummy &&
1936
	 gfc_add_external (&gfc_new_block->attr, &gfc_current_locus) == FAILURE)
1937
	{
1938
	  reject_statement ();
1939
	  gfc_free_namespace (gfc_current_ns);
1940
	  goto loop;
1941
	}
1926
      break;
1942
      break;
1927
1943
1928
    case ST_PROCEDURE:
1944
    case ST_PROCEDURE:

Return to bug 36325