On 7/1/21 10:14 PM, Martin Sebor wrote:
On 6/30/21 5:35 PM, David Malcolm wrote:
On Wed, 2021-06-30 at 13:45 -0600, Martin Sebor wrote:
On 6/30/21 9:39 AM, Martin Sebor wrote:

@@ -90,8 +90,8 @@ NOIPA void warn_g2 (struct A *p)
    g2 (p);
  }
-// { dg-message "inlined from 'g2'" "" { target *-*-* } 0 }
-// { dg-message "inlined from 'warn_g2'" "" { target *-*-* } 0 }
+// { dg-message "inlined from 'g2'" "note on line 93" { target *-*-* } 0 } +// { dg-message "inlined from 'warn_g2'" "note on line 94" { target *-*-* } 0 }

You've added descriptions to disambiguate all of the various directives
on line 0, which is good, but I don't like the use of line numbers in
the descriptions, since it will get very confusing if the numbering
changes.

Would it work to use the message text as the description e.g.

   // { dg-message "inlined from 'warn_g2'" "inlined from 'warn_g2'" { target *-*-* } 0 }

or somesuch?

It would certainly work, they're just informational labels printed
by DejaGnu when the assertions fail.  I added them to help me see
what they went with while working with the test.  I'm not concerned
about the line numbers changing.  If they do and someone notices,
they can update them, the same way they might want to if they
rename the functions they're inlined into.

I agree with David. Having too specific tests adds an extra maintenance burden. You may not mind updating all the line numbers when anything changes, but others may certainly mind.

Aldy

Reply via email to