Bug 82173 (PDT) - [meta-bug] Parameterized derived type errors
Summary: [meta-bug] Parameterized derived type errors
Status: ASSIGNED
Alias: PDT
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: ---
Assignee: Paul Thomas
URL:
Keywords:
Depends on: 82205 82243 82649 82753 82842 82843 82943 83274 83275 83646 83746 83762 83763 84008 84119 84122 84143 84432 85942 86052 86148 86268 86657 87669 89413 89707 89751 90218 82168 82375 82497 82586 82587 82589 82605 82606 82620 82622 82719 82720 82865 82866 82978 82979 83567 83611 83731 84120 89601
Blocks: F2003
  Show dependency treegraph
 
Reported: 2017-09-11 08:39 UTC by Thomas Koenig
Modified: 2019-06-06 13:20 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-09-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2017-09-11 08:39:26 UTC
A PDT meta-bug to make them easier to find.
Comment 1 Paul Thomas 2017-09-11 15:22:52 UTC
Dear Thomas,

Thanks for doing that.

Cheers

Paul
Comment 2 Paul Thomas 2017-09-12 18:07:24 UTC
Author: pault
Date: Tue Sep 12 18:06:52 2017
New Revision: 252039

URL: https://gcc.gnu.org/viewcvs?rev=252039&root=gcc&view=rev
Log:
2017-09-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/82173
	PR fortran/82168
	* decl.c (variable_decl): Check pdt template components for
	appearance of KIND/LEN components in the type parameter name
	list, that components corresponding to type parameters have
	either KIND or LEN attributes and that KIND or LEN components
	are scalar. Copy the initializer to the parameter value.
	(gfc_get_pdt_instance): Add a label 'error_return' and follow
	it with repeated code, while replacing this code with a jump.
	Check if a parameter appears as a component in the template.
	Make sure that the parameter expressions are integer. Validate
	KIND expressions.
	(gfc_match_decl_type_spec): Search for pdt_types in the parent
	namespace since they are instantiated in the template ns.
	* expr.c (gfc_extract_int): Use a KIND parameter if it
	appears as a component expression.
	(gfc_check_init_expr): Allow expressions with the pdt_kind
	attribute.
	*primary.c (gfc_match_actual_arglist): Make sure that the first
	keyword argument is recognised when 'pdt' is set.


2017-09-12  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/82173
	* gfortran.dg/pdt_4.f03 : Remove the 'is being used before it
	is defined' error.
	* gfortran.dg/pdt_6.f03 : New test.
	* gfortran.dg/pdt_7.f03 : New test.
	* gfortran.dg/pdt_8.f03 : New test.

	PR fortran/82168
	* gfortran.dg/pdt_9.f03 : New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pdt_6.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_7.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_8.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_9.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/pdt_4.f03
Comment 3 Paul Thomas 2017-09-13 21:15:58 UTC
Author: pault
Date: Wed Sep 13 21:15:26 2017
New Revision: 252734

URL: https://gcc.gnu.org/viewcvs?rev=252734&root=gcc&view=rev
Log:
2017-09-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/82173
	* decl.c (match_char_kind): If the kind expression is
	parameterized, save it in saved_kind_expr and set kind = 0.
	(gfc_get_pdt_instance): Resolve and simplify before emitting
	error on expression kind. Insert a missing simplification after
	insertion of kind expressions.

2017-09-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/82173
	* gfortran.dg/pdt_10.f03 : New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pdt_10.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Paul Thomas 2017-09-17 18:25:08 UTC
Author: pault
Date: Sun Sep 17 18:24:37 2017
New Revision: 252894

URL: https://gcc.gnu.org/viewcvs?rev=252894&root=gcc&view=rev
Log:
2017-09-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/82173
	* decl.c (gfc_get_pdt_instance): Use the component initializer
	expression for the default, rather than the parameter value.
	* resolve.c (resolve_pdt): New function.
	(resolve_symbol): Call it. Remove false error, prohibiting
	deferred type parameters for dummy arguments.

	PR fortran/60483
	* primary.c (gfc_match_varspec): If the type of an associate
	name is unknown and yet there is a match, try resolving the
	target expression and using its type.

2017-09-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/82173
	* gfortran.dg/pdt_1.f03 : Eliminate spurious error checks.
	* gfortran.dg/pdt_2.f03 : The same.
	* gfortran.dg/pdt_3.f03 : The same.
	* gfortran.dg/pdt_4.f03 : Add 'modtype' and two new errors in
	module 'bad_vars'. Add error concerning assumed parameters and
	save attribute.
	* gfortran.dg/pdt_11.f03 : New test.

	PR fortran/60483
	* gfortran.dg/associate_9.f90 : Remove XFAIL and change to run.
	* gfortran.dg/associate_25.f90 : New test.
	* gfortran.dg/pdt_12.f03 : New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/associate_25.f90
    trunk/gcc/testsuite/gfortran.dg/pdt_11.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_12.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/associate_9.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_1.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_2.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_3.f03
    trunk/gcc/testsuite/gfortran.dg/pdt_4.f03