Bug 37011 - F2003, type extension: multiple inheritence not rejected
Summary: F2003, type extension: multiple inheritence not rejected
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Paul Thomas
URL:
Keywords: accepts-invalid
Depends on:
Blocks: F2003
  Show dependency treegraph
 
Reported: 2008-08-02 23:53 UTC by Daniel Franke
Modified: 2008-08-08 23:28 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-08-07 21:23:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Franke 2008-08-02 23:53:06 UTC
F2003, sec. 4.5.1 (derived type definition): EXTENDS is an attribute that can not be specified more than once. Currently (20080803), gfortran accepts:

TYPE :: b
  INTEGER :: i
END TYPE

TYPE, EXTENDS(b), EXTENDS(b) :: d
  INTEGER :: j
END TYPE
Comment 1 Paul Thomas 2008-08-07 21:23:14 UTC
Daniel,

By golly, I never even thought of that possibility. Thanks!

I'll fix it as obvious as soon as I can.

Paul

PS Could you please CC me next time?  I do not have ove much time for hacking right now.  I either do the business or follow Bugzilla:-(
Comment 2 Daniel Franke 2008-08-07 21:40:02 UTC
> Could you please CC me next time?

Thought I did, I Surely wanted to?!
Please excuse the oversight :)
Comment 3 Paul Thomas 2008-08-08 23:24:14 UTC
Subject: Bug 37011

Author: pault
Date: Fri Aug  8 23:22:51 2008
New Revision: 138891

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138891
Log:
2008-08-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/37011
	* symbol.c (gfc_add_extension): New function.
	* decl.c (gfc_get_type_attr_spec): Call it.
	(gfc_match_derived_decl): Set symbol extension attribute from
	attr.extension.
	* gfortran.h : Add prototype for gfc_add_extension.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/symbol.c

Comment 4 Paul Thomas 2008-08-08 23:26:43 UTC
Fixed as obvious.

Thanks for the report.

Paul
Comment 5 Daniel Franke 2008-08-08 23:28:46 UTC
No testcase?