From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17865 invoked by alias); 7 Dec 2012 21:14:16 -0000 Received: (qmail 17706 invoked by uid 48); 7 Dec 2012 21:13:58 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55618] [4.6/4.7/4.8 Regression] Failures with ISO_Varying_String test suite Date: Fri, 07 Dec 2012 21:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-12/txt/msg00765.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55618 --- Comment #1 from Tobias Burnus 2012-12-07 21:13:57 UTC --- Created attachment 28898 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28898 Test case (still depends on the iso_varying_string module) Slightly reduced test case - still needs the iso_varying_string module. Compiling with 4.4/4.8 and 4.8/4.4 shows that the attached file miscompiled while the big iso_varying_string module is correctly handled. If one compares the dump between 4.4 and 4.8 for the second (the array) SPLIT call, one finds for 4.4 and 4.8, respectively: split_ch (&strar[S.14 + D.1624], &wrdar[S.14 + D.1625], D.1621, &separ[S.14 + D.1626], 0B, MAX_EXPR ); split_ch (&strar[S.14 + D.1624], &wrdar[S.14 + D.1625], &D.1621, &separ[S.14 + D.1626], 0B, MAX_EXPR ); Note the "&" before D.1621. The latter is: character(kind=1)[1:MAX_EXPR ] * pstr.12; D.1964 = &set; D.1619 = __builtin_malloc (....) char_auto (pstr.12, MAX_EXPR , D.1964); pstr.12 = (character(kind=1)[1:MAX_EXPR ] *) D.1619; The called function is defined as: elemental subroutine split_CH (string, word, set, separator, back) type(varying_string), intent(inout) :: string type(varying_string), intent(out) :: word character(LEN=*), intent(in) :: set type(varying_string), intent(out), optional :: separator logical, intent(in), optional :: back