From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11274 invoked by alias); 19 Apr 2007 06:44:43 -0000 Received: (qmail 11230 invoked by uid 48); 19 Apr 2007 06:44:34 -0000 Date: Thu, 19 Apr 2007 06:44:00 -0000 Message-ID: <20070419064434.11227.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/31608] wrong types in array transfer In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg01448.txt.bz2 ------- Comment #6 from burnus at gcc dot gnu dot org 2007-04-19 07:44 ------- > Nevertheless, the accepts-invalid is also an embarassing problem (unless we > collectively misunderstand Fortran rules :) Well, we do. if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) stop 'ERROR' compiles with - NAG f95 5.1(346) - g95 -std=f95 -W -Wall -Wextra -pedantic 4.0.3 (g95 0.91!) Feb 23 2007 - ifort -stand f95 -warn all (9.1.040, 10.0.017beta) - sunf95 -w4 8.3 Build35_2 2006/12/04 And, of cause, it does not have anything to do with Fortran 2003 (The following would be: up("abcdef") -> function up(string); character(len=1), dimension(:) :: string). What we have here is: 7.1.5 Conformability rules for elemental operations [...] For all elemental binary operations, the two operands shall be in shape conformance. In the case where one is a scalar and the other an array, the scalar is treated as if it were an array of the same shape as the array operand with every element, if any, of the array equal to the value of the scalar. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31608