On Mon, Sep 30, 2019 at 08:31:23PM +0200, Andreas Tobler wrote: > Ok, yes it works too with your suggestion. > > Attached.
Ok for trunk. > One question, doing it per test case is cheaper than in prune.exp? (Where we > do it for 'all' test cases, needed or not.) IMHO yes, doing it 200000 or how many times vs. just 3 times should make a difference. > Index: fprintf-2.c > =================================================================== > --- fprintf-2.c (revision 276292) > +++ fprintf-2.c (working copy) > @@ -1,7 +1,8 @@ > /* Verify that calls to fprintf don't get eliminated even if their > result on success can be computed at compile time (they can fail). > The calls can still be transformed into those of other functions. > - { dg-skip-if "requires io" { freestanding } } */ > + { dg-skip-if "requires io" { freestanding } } > + { dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely; > consider using" } */ > > #include <stdio.h> > #include <stdlib.h> > Index: printf-2.c > =================================================================== > --- printf-2.c (revision 276292) > +++ printf-2.c (working copy) > @@ -2,7 +2,8 @@ > result on success can be computed at compile time (they can fail). > The calls can still be transformed into those of other functions. > { dg-require-effective-target unwrapped } > - { dg-skip-if "requires io" { freestanding } } */ > + { dg-skip-if "requires io" { freestanding } } > + { dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely; > consider using" } */ > > #include <stdio.h> > #include <stdlib.h> > Index: user-printf.c > =================================================================== > --- user-printf.c (revision 276292) > +++ user-printf.c (working copy) > @@ -2,7 +2,8 @@ > don't get eliminated even if their result on success can be computed at > compile time (they can fail). > { dg-require-effective-target unwrapped } > - { dg-skip-if "requires io" { freestanding } } */ > + { dg-skip-if "requires io" { freestanding } } > + { dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely; > consider using" } */ > > #include <stdarg.h> > #include <stdio.h> Jakub