From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11127 invoked by alias); 17 Jun 2007 21:45:32 -0000 Received: (qmail 11089 invoked by uid 48); 17 Jun 2007 21:45:24 -0000 Date: Sun, 17 Jun 2007 21:45:00 -0000 Message-ID: <20070617214524.11088.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32140] [4.3 Regression] Miscompilation with -O1 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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-06/txt/msg01379.txt.bz2 ------- Comment #16 from pinskia at gcc dot gnu dot org 2007-06-17 21:45 ------- I was wrong in marking this as a middle-end issue. We have: char[0:D.1026][1:4] * __result.0; char * temp.87; ... temp.87 = &(*__result.0)[0]; __builtin_memset (temp.87 + () _s1, 32, 4 - _s1); ----------- cut ---------- The midde-end thinks it can combine &(*__result.0)[0] + () _s1 to just &(*__result.0)[() _s1] when it should have combined it to &(*__result.0)[0][() _s1] So &(*__result.0)[0] is wrong, it should have been: &(*__result.0)[0][0]. Let me see if I can figure out where to fix the front-end. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Component|middle-end |fortran http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32140