testsuite: Skip some gcc.dg/plugin tests for default_packed targets
authorHans-Peter Nilsson <hp@axis.com>
Fri, 17 Mar 2023 16:03:34 +0000 (17:03 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Fri, 17 Mar 2023 23:44:05 +0000 (00:44 +0100)
Avoid unweildy structure-layout-specific message-matching
expressions by exluding targets that lay out structures as
if they had been specified with __attribute__ ((__packed__)),
for tests where multiple messages depend on the structure
layout.

It's arguably a judgement call whether to skip some of these
tests or add multiple lines of matches depending on the
layout of structures.

* gcc.dg/plugin/infoleak-2.c,
gcc.dg/plugin/infoleak-CVE-2011-1078-1.c,
gcc.dg/plugin/infoleak-CVE-2011-1078-2.c,
gcc.dg/plugin/infoleak-CVE-2017-18549-1.c,
gcc.dg/plugin/infoleak-CVE-2017-18550-1.c,
gcc.dg/plugin/infoleak-antipatterns-1.c,
gcc.dg/plugin/infoleak-fixit-1.c: Skip for default_packed targets.

gcc/testsuite/gcc.dg/plugin/infoleak-2.c
gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-1.c
gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2011-1078-2.c
gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18549-1.c
gcc/testsuite/gcc.dg/plugin/infoleak-CVE-2017-18550-1.c
gcc/testsuite/gcc.dg/plugin/infoleak-antipatterns-1.c
gcc/testsuite/gcc.dg/plugin/infoleak-fixit-1.c

index 252f8f2..43ab41b 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 #include <string.h>
 
index 3616fbe..8afce8e 100644 (file)
@@ -9,6 +9,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 #include <string.h>
 
index 2096bda..1142cf2 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 #include <string.h>
 
index 8a1c816..239c7d1 100644 (file)
@@ -10,6 +10,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 #include <string.h>
 
index 4272da9..449348a 100644 (file)
@@ -10,6 +10,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 #include <string.h>
 
index 5008453..84789a7 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 typedef unsigned char u8;
 typedef unsigned __INT16_TYPE__ u16;
index 6961b44..56158c1 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fanalyzer" } */
 /* { dg-require-effective-target analyzer } */
+/* { dg-skip-if "structure layout assumption not met" { default_packed } } */
 
 #include <string.h>