The attached test case failed with gcc 4.9 and older, but started compiling successfully with only the 1 expected warning with gcc 5. Adding it to the test suite would ensure that this behavior doesn't regress. Note that I have only tested it by compiling it manually, and not by actually running it as part of the entire test suite, so please let me know if I got any of the dejagnu directives wrong. Thanks, Eric Gallager gcc/testsuite/ChangeLog: 2017-03-24 Eric Gallager * gcc.dg/pragma-diag-7.c: New test.