From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27733 invoked by alias); 11 Oct 2015 09:05:43 -0000 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 Received: (qmail 27684 invoked by uid 48); 11 Oct 2015 09:05:38 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/67779] Strange ordering with strings in extended object Date: Sun, 11 Oct 2015 09:05: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-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg00812.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67779 --- Comment #6 from Dominique d'Humieres --- The problem is not limited to strings. If I add the following lines array(1)%value = 2 array(9)%value = 10 write( string_array(1)%value, '(a,i0)' ) "String = ", 2 write( string_array(9)%value, '(a,i0)' ) "String = ", 10 the initial values are 2 'String = 2 ' 9 'String = 9 ' 8 'String = 8 ' 7 'String = 7 ' 6 'String = 6 ' 5 'String = 5 ' 4 'String = 4 ' 3 'String = 3 ' 10 'String = 10 ' 1 'String = 1 ' and the "sorted" ones are 2 1 3 4 5 6 7 8 10 9 String = 2 String = 1 String = 10 String = 3 String = 4 String = 5 String = 6 String = 7 String = 8 String = 9