gcc/testsuite/ChangeLog:
* gcc.dg/dg-test-1.c: Add tests of relative line specifications
with more than one digit.
* lib/gcc-dg.exp (process-message): Support more than one digit
in relative line specifications.
From-SVN: r244024
+2017-01-03 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/dg-test-1.c: Add tests of relative line specifications
+ with more than one digit.
+ * lib/gcc-dg.exp (process-message): Support more than one digit
+ in relative line specifications.
+
2017-01-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/78965
bar (int e, int f, int g, int h)/* { dg-warning "unused parameter 'g'" "warn3" { target *-*-* } . } */
{ /* { dg-warning "unused parameter 'h'" "warn4" { target *-*-* } .-1 } */
}
+
+
+/* Ensure that relative line numbers with more than one digit are supported. */
+/* { dg-warning "unused parameter 'i'" "warn5" { target *-*-* } .+10 } */
+
+
+
+
+
+
+
+
+void
+baz (int i, int j)
+{
+}
+
+
+
+
+
+
+
+/* { dg-warning "unused parameter 'j'" "warn6" { target *-*-* } .-10 } */
# Handle relative line specification, .+1 or .-1 etc.
if { [llength $dgargs] == 5
- && [regsub "^\.\[+-\](\[0-9\])$" [lindex $dgargs 4] "\\1" num] } {
+ && [regsub "^\.\[+-\](\[0-9\]+)$" [lindex $dgargs 4] "\\1" num] } {
set num [expr [lindex $dgargs 0] [string index [lindex $dgargs 4] 1] $num]
set dgargs [lreplace $dgargs 4 4 $num]
}