Bug 25092 - Result lengths different at different entries
Summary: Result lengths different at different entries
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Paul Thomas
URL:
Keywords: accepts-invalid
Depends on: 25091
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-26 18:05 UTC by Joost VandeVondele
Modified: 2006-10-03 20:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-09-05 19:43:13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2005-11-26 18:05:30 UTC
using GNU Fortran 95 (GCC) 4.1.0 20051126 (prerelease)  with '-g -pedantic -std=f95', I get a bad / no diagnostic for the following invalid code:

 FUNCTION F1() RESULT(RES_F1)
 INTEGER :: RES_F1(4)
 INTEGER :: RES_E1(3)
 ENTRY E1() RESULT(RES_E1)
 END FUNCTION
 END
Comment 1 Andrew Pinski 2006-01-20 21:51:58 UTC
Confirmed, related to PR 25091.
Comment 2 Paul Thomas 2006-09-05 19:43:13 UTC
The patch is mine!

Paul
Comment 3 Paul Thomas 2006-10-03 20:13:23 UTC
Subject: Bug 25092

Author: pault
Date: Tue Oct  3 20:13:03 2006
New Revision: 117413

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

	PR fortran/29284
	PR fortran/29321
	PR fortran/29322
	* trans-expr.c (gfc_conv_function_call): Check the expression
	and the formal symbol are present when testing the actual
	argument.

	PR fortran/25091
	PR fortran/25092
	* resolve.c (resolve_entries): It is an error if the entries
	of an array-valued function do not have the same shape.

2006-10-03  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29284
	* gfortran.dg/optional_assumed_charlen_1.f90: New test.

	PR fortran/29321
	PR fortran/29322
	* gfortran.dg/missing_optional_dummy_2.f90: New test.

	PR fortran/25091
	PR fortran/25092
	* gfortran.dg/entry_array_specs_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/entry_array_specs_1.f90
    trunk/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
    trunk/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Paul Thomas 2006-10-03 20:17:02 UTC
Fixed on trunk

Paul
Comment 5 Francois-Xavier Coudert 2006-10-24 08:06:25 UTC
Subject: Bug 25092

Author: fxcoudert
Date: Tue Oct 24 08:05:55 2006
New Revision: 117996

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117996
Log:
A bunch of backports:

	PR fortran/29284
	PR fortran/29321
	PR fortran/29322
	* trans-expr.c (gfc_conv_function_call): Check the expression
	and the formal symbol are present when testing the actual
	argument.

	PR fortran/25091
	PR fortran/25092
	* resolve.c (resolve_entries): It is an error if the entries
	of an array-valued function do not have the same shape.

	PR fortran/29284
	* gfortran.dg/optional_assumed_charlen_1.f90: New test.

	PR fortran/29321
	PR fortran/29322
	* gfortran.dg/missing_optional_dummy_2.f90: New test.

	PR fortran/25091
	PR fortran/25092
	* gfortran.dg/entry_array_specs_1.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/entry_array_specs_1.f90
      - copied unchanged from r117413, trunk/gcc/testsuite/gfortran.dg/entry_array_specs_1.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
      - copied unchanged from r117413, trunk/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
      - copied unchanged from r117413, trunk/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog