]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Silence analyzer/pr51628-30.c for default_packed
authorDimitar Dimitrov <dimitar@dinux.eu>
Fri, 22 Apr 2022 15:22:00 +0000 (18:22 +0300)
committerDimitar Dimitrov <dimitar@dinux.eu>
Mon, 9 May 2022 16:31:55 +0000 (19:31 +0300)
On default_packed targets like PRU, a warning in the file included from
analyzer/pr51628-30.c is reported as spurious one, even though it has been
annotated there:

  Excess errors:
  gcc/gcc/testsuite/gcc.dg/analyzer/torture/../../../c-c++-common/pr51628-30.c:7:19: warning: 'packed' attribute ignored for field of type 'struct B' [-Wattributes]

Mark that gcc.dg/analyzer/torture/pr51628-30.c generates excess warnings
for default_packed targets.  This is safe because the original test case
covered an ICE, not a diagnostic error.

gcc/testsuite/ChangeLog:

* gcc.dg/analyzer/torture/pr51628-30.c: Test can spill excess
errors for default_packed targets.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
gcc/testsuite/gcc.dg/analyzer/torture/pr51628-30.c

index 4513e0f890c9d5498f1a2c8a7f54c95c12e267b2..abc13413f2bfc2e00523166dbe3a3847c72fba67 100644 (file)
@@ -1,3 +1,4 @@
 /* { dg-additional-options "-Wno-address-of-packed-member" } */
+/* { dg-excess-errors "warnings about ignored 'packed' attribute" { target default_packed } } */
 
 #include "../../../c-c++-common/pr51628-30.c"