From: Torbjörn SVENSSON Date: Sat, 9 Mar 2024 08:40:07 +0000 (+0100) Subject: testsuite: xfail test for short_enums X-Git-Tag: releases/gcc-13.3.0~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1277f69b9b020688618bd034d3ceb03395e84326;p=thirdparty%2Fgcc.git testsuite: xfail test for short_enums On arm-none-eabi, the test case fails with .../null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:63:65: warning: converting a packed 'enum obj_type' pointer (alignment 1) to a 'struct connection' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] The error was fixed in basepoints/gcc-14-6517-gb7e4a4c626e, but it was considered to be a too big change to be backported and thus, the failing test is marked xfail in GCC13. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c: Added dg-bogus with xfail on offending line for short_enums. Signed-off-by: Torbjörn SVENSSON --- diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c index 2a9c715c32c4..e8cde7338a0a 100644 --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c @@ -60,7 +60,7 @@ static inline enum obj_type obj_type(const enum obj_type *t) } static inline struct connection *__objt_conn(enum obj_type *t) { - return ((struct connection *)(((void *)(t)) - ((long)&((struct connection *)0)->obj_type))); + return ((struct connection *)(((void *)(t)) - ((long)&((struct connection *)0)->obj_type))); /* { dg-bogus "may result in an unaligned pointer value" "Fixed in r14-6517-gb7e4a4c626e" { xfail short_enums } */ } static inline struct connection *objt_conn(enum obj_type *t) {