Bug 20869 - EXTERNAL and INTRINSIC cannot be used together
Summary: EXTERNAL and INTRINSIC cannot be used together
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: kargls
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2005-04-08 15:57 UTC by Joost VandeVondele
Modified: 2006-01-23 16:34 UTC (History)
1 user (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-17 00:02:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2005-04-08 15:57:51 UTC
The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95'


EXTERNAL :: NINT
INTRINSIC :: NINT
END
Comment 1 Andrew Pinski 2005-04-08 20:55:44 UTC

*** This bug has been marked as a duplicate of 20373 ***
Comment 2 Andrew Pinski 2006-01-08 05:44:48 UTC
Actually this is not a dup of bug 20373.  I don't know where I got that from.
Comment 3 Andrew Pinski 2006-01-08 05:47:26 UTC
Confirmed.
Comment 4 kargls 2006-01-17 00:02:20 UTC
I have a patch
Comment 5 Paul Thomas 2006-01-18 18:55:06 UTC
Subject: Bug 20869

Author: pault
Date: Wed Jan 18 18:55:01 2006
New Revision: 109899

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109899
Log:
2006-01-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/20869
	PR fortran/20875
	PR fortran/25024
	* symbol.c (check_conflict): Add pointer valued elemental
	functions and internal procedures with the external attribute
	to the list of conflicts.
	(gfc_add_attribute): New catch-all function to perform the
	checking of symbol attributes for attribute declaration
	statements.
	* decl.c (attr_decl1): Call gfc_add_attribute for each of -
	(gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
	gfc_match_pointer, gfc_match_dimension, gfc_match_target):
	Remove spurious calls to checks in symbol.c.  Set the
	attribute directly and use the call to attr_decl() for
	checking.
	* gfortran.h:  Add prototype for gfc_add_attribute.

	PR fortran/25785
	* resolve.c (resolve_function): Exclude PRESENT from assumed size
	argument checking. Replace strcmp's with comparisons with generic
	codes.

2006-01-18  Paul Thomas  <pault@gcc.gnu.org>
	    Steven G. Kargl  <kargls@comcast.net>

	PR fortran/20869
	* gfortran.dg/intrinsic_external_1.f90: New test.

	PR fortran/20875.
	* gfortran.dg/elemental_pointer_1.f90: New test.

	PR fortran/25024
	* gfortran.dg/external_procedures_1.f90: New test.

	PR fortran/25785
	gfortran.dg/assumed_present.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/assumed_present.f90
    trunk/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90
    trunk/gcc/testsuite/gfortran.dg/external_procedures_1.f90
    trunk/gcc/testsuite/gfortran.dg/intrinsic_external_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog

Comment 6 Paul Thomas 2006-01-18 18:56:49 UTC
Subject: Bug 20869

Author: pault
Date: Wed Jan 18 18:56:43 2006
New Revision: 109900

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109900
Log:
2006-01-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/20869
	PR fortran/20875
	PR fortran/25024
	* symbol.c (check_conflict): Add pointer valued elemental
	functions and internal procedures with the external attribute
	to the list of conflicts.
	(gfc_add_attribute): New catch-all function to perform the
	checking of symbol attributes for attribute declaration
	statements.
	* decl.c (attr_decl1): Call gfc_add_attribute for each of -
	(gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
	gfc_match_pointer, gfc_match_dimension, gfc_match_target):
	Remove spurious calls to checks in symbol.c.  Set the
	attribute directly and use the call to attr_decl() for
	checking.
	* gfortran.h:  Add prototype for gfc_add_attribute.

	PR fortran/25785
	* resolve.c (resolve_function): Exclude PRESENT from assumed size
	argument checking. Replace strcmp's with comparisons with generic
	codes.

2006-01-18  Paul Thomas  <pault@gcc.gnu.org>
	    Steven G. Kargl  <kargls@comcast.net>

	PR fortran/20869
	* gfortran.dg/intrinsic_external_1.f90: New test.

	PR fortran/20875.
	* gfortran.dg/elemental_pointer_1.f90: New test.

	PR fortran/25024
	* gfortran.dg/external_procedures_1.f90: New test.

	PR fortran/25785
	gfortran.dg/assumed_present.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_present.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/external_procedures_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/intrinsic_external_1.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/decl.c
    branches/gcc-4_1-branch/gcc/fortran/gfortran.h
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/symbol.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog

Comment 7 Paul Thomas 2006-01-18 18:57:56 UTC
Fixed on trunk and 4.1