public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Committed fix for your r161745 to gfortran.dg/char_bounds_check_fail_1.f90
@ 2010-07-03  6:08 Hans-Peter Nilsson
  2010-07-03 12:10 ` Jerry DeLisle
  0 siblings, 1 reply; 2+ messages in thread
From: Hans-Peter Nilsson @ 2010-07-03  6:08 UTC (permalink / raw)
  To: jvdelisle; +Cc: fortran, gcc-patches

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.

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" }

brgds, H-P

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Committed fix for your r161745 to gfortran.dg/char_bounds_check_fail_1.f90
  2010-07-03  6:08 Committed fix for your r161745 to gfortran.dg/char_bounds_check_fail_1.f90 Hans-Peter Nilsson
@ 2010-07-03 12:10 ` Jerry DeLisle
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry DeLisle @ 2010-07-03 12:10 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: fortran, gcc-patches

On 07/02/2010 11:08 PM, Hans-Peter Nilsson wrote:
> 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:

We discussed the dg-syntax problems on IRC.  There was another one broken after 
fixing the syntax that I found, but I mussed this one.

Thanks for fixing.

Jerry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-03 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-03  6:08 Committed fix for your r161745 to gfortran.dg/char_bounds_check_fail_1.f90 Hans-Peter Nilsson
2010-07-03 12:10 ` Jerry DeLisle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).