From patchwork Sat Jul 3 06:08:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 57793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B4BD3B70BC for ; Sat, 3 Jul 2010 16:08:35 +1000 (EST) Received: (qmail 25310 invoked by alias); 3 Jul 2010 06:08:33 -0000 Received: (qmail 25286 invoked by uid 22791); 3 Jul 2010 06:08:32 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from miranda.se.axis.com (HELO miranda.se.axis.com) (193.13.178.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 03 Jul 2010 06:08:26 +0000 Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id o6368Mvs012726; Sat, 3 Jul 2010 08:08:22 +0200 Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id o6368MF6023534; Sat, 3 Jul 2010 08:08:22 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id o6368Ltk023530; Sat, 3 Jul 2010 08:08:21 +0200 Date: Sat, 3 Jul 2010 08:08:21 +0200 Message-Id: <201007030608.o6368Ltk023530@ignucius.se.axis.com> From: Hans-Peter Nilsson To: jvdelisle@verizon.net CC: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Committed fix for your r161745 to gfortran.dg/char_bounds_check_fail_1.f90 MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org I don't see the patch for that commit on the gcc-patches@ nor fortran@ lists. Anyway, the patch had a formerly hidden (due to the invalid dg-syntax you fixed) syntax error; an unquoted ')', causing: Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp ... ERROR: tcl error sourcing /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp. ERROR: couldn't compile regular expression pattern: parentheses () not balanced while executing "regexp $texttmp ${output}" invoked from within "if ![file exists $output_file] { warning "$name compilation failed to produce executable" } else { set status -1 set result [${tool}_l..." (procedure "saved-dg-test" line 224) invoked from within "saved-dg-test /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 { -O0 } { -pedantic-errors}" ("eval" body line 1) invoked from within "eval saved-dg-test $args " (procedure "dg-test" line 9) invoked from within "dg-test $test $flags ${default-extra-flags}" (procedure "gfortran-dg-runtest" line 27) invoked from within "gfortran-dg-runtest [lsort \ [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] $DEFAULT_FFLAGS" (file "/tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp" line 32) invoked from within "source /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp" invoked from within "catch "uplevel #0 source $test_file_name"" Not only that, but the old text was wrong; the diagnostic apparently has changed. AFAICT, the test should pass. The diagnostic emitted when testing for cris-elf is: At line 10 of file /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 Fortran runtime error: Substring out of bounds: upper bound (11) of 'zz' exceeds string length (10) So, I believe it was correct and obvious to commit the following patch. You may want to follow-up and remove the exact bound specifications which weren't present in the old text, but please be careful about the regexp syntax. Of course running the test-suite after the change and inspect the log helps. ;) BTW, those regexp evaluations really should be in some kind of "catch"-clause in whatever lib/*.exp, so they don't mess up the rest of the test-run! (Which is how I spotted it; a FAIL was unexpectedly gone.) Or perhaps reported to bug-dejagnu if it can't be fixed like that locally. Commited after observing that the above was fixed. gcc/testsuite: * gfortran.dg/char_bounds_check_fail_1.f90: Correct dg-output string. brgds, H-P Index: gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 (revision 161765) +++ gcc/testsuite/gfortran.dg/char_bounds_check_fail_1.f90 (working copy) @@ -10,4 +10,4 @@ zz(i:j) = 'abcdef' print * , zz end -! { dg-output "Substring out of bounds: upper bound exceeds string length.*at line 9)" } +! { dg-output "At line 10.*Substring out of bounds: upper bound \\(11\\) of 'zz' exceeds string length" }