Bug 19754 - Shape conformance not checked
Summary: Shape conformance not checked
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2005-02-02 13:23 UTC by Salvatore Filippone
Modified: 2005-08-02 17:20 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-02-03 00:07:20


Attachments
test case (86 bytes, text/plain)
2005-02-02 13:24 UTC, Salvatore Filippone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore Filippone 2005-02-02 13:23:23 UTC
On the attached sample code the compiler fails to issue a shape conformance
error message, which is indeed printed by other compilers (e.g. Intel 8.1)

[sfilippo@localhost TEMP]$ gfortran -v
Using built-in specs.
Configured with: ../gcc-4.0-20050130/configure --prefix=/usr/local/gfortran
Thread model: posix
gcc version 4.0.0 20050130 (experimental)

[sfilippo@localhost TEMP]$ gfortran -o tmp1 tmp1.f90
Comment 1 Salvatore Filippone 2005-02-02 13:24:27 UTC
Created attachment 8127 [details]
test case
Comment 2 Andrew Pinski 2005-02-03 00:07:20 UTC
Confirmed.
Comment 3 Steve Kargl 2005-02-03 05:01:47 UTC
I've submitted a patch  at

http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00202.html

which addresses this problem.  It however introduces 
16 regressions in the test suite, which I think are
latent bugs in the implementation of certian intrinsic
procedures.
Comment 4 Steve Kargl 2005-02-06 18:12:32 UTC
An updated patch that does not have the regression is here
http://gcc.gnu.org/ml/fortran/2005-02/msg00039.html
Comment 5 GCC Commits 2005-03-05 22:13:27 UTC
Subject: Bug 19754

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kargl@gcc.gnu.org	2005-03-05 22:13:22

Modified files:
	gcc/fortran    : ChangeLog resolve.c 

Log message:
	PR fortran/19754
	* resolve.c (compare_shapes):  New function.
	(resolve_operator): Use it.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.344&r2=1.345
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&r1=1.34&r2=1.35

Comment 6 GCC Commits 2005-03-05 22:18:37 UTC
Subject: Bug 19754

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	kargl@gcc.gnu.org	2005-03-05 22:18:28

Modified files:
	gcc/fortran    : ChangeLog resolve.c 

Log message:
	PR fortran/19754
	* resolve.c (compare_shapes):  New function.
	(resolve_operator): Use it.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.7&r2=1.335.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.34&r2=1.34.2.1

Comment 7 kargls 2005-03-05 22:31:33 UTC
Fixed.
Comment 8 Uttam Pawar 2005-08-02 17:20:47 UTC
(In reply to comment #7)
> Fixed.

Shouldn't the following test fail too with the shape conformance error message?

program test
integer ::a(2,2)
real :: b(4,4)
a=1
b=2.0
b = b + a
end program test