From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12802 invoked by alias); 17 Apr 2007 16:22:57 -0000 Received: (qmail 12678 invoked by uid 48); 17 Apr 2007 16:22:45 -0000 Date: Tue, 17 Apr 2007 16:22:00 -0000 Subject: [Bug fortran/31608] New: wrong types in array transfer X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth 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/msg01247.txt.bz2 gfortran.dg/achar_4.f90 generates the following snippet of original trees: { int8 S.5; S.5 = 0; while (1) { if (S.5 > (D.1394 + 0) - 1) goto L.1; { char char.6; char.6 = (*(char[0:][1:1] *) atmp.0.data)[S.5][1]{lb: 1 sz: 1} + 224; (*(char[0:][1:1] *) atmp.4.data)[S.5] = *(_gfortran_compare_string (D.1384, &(*(char[0:][1:1] *) atmp.2.data)[S.5], 1, "a") >= 0 && _gfortran_compare_string (D.1393, &(*(char[0:][1:1] *) atmp.3.data)[S.5], 1, "z") <= 0 ? &char.6 : &(*(char[0:][1:1] *) atmp.1.data)[S.5]); } S.5 = S.5 + 1; } L.1:; } which clearly has mismatched types in the two arms of the COND_EXPR .... = .... ? &char.6 : &(*(char[0:][1:1] *) atmp.1.data)[S.5]) the then arm is of type char* while the else arm has pointer to array type. This confuses the middle-end. -- Summary: wrong types in array transfer Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31608