public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-6382] testsuite: Fix analyzer errors for newlib-fd
Date: Wed, 1 Mar 2023 01:39:45 +0000 (GMT) [thread overview]
Message-ID: <20230301013945.498DE3858D33@sourceware.org> (raw)
https://gcc.gnu.org/g:6622f7e8b896071cc554774171353cc82a4a3a5f
commit r13-6382-g6622f7e8b896071cc554774171353cc82a4a3a5f
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Tue Feb 28 18:37:32 2023 +0100
testsuite: Fix analyzer errors for newlib-fd
Investigating analyzer testsuite errors for cris-elf. The same are
seen for pru-elf according to posts to gcc-testresults@.
The test fd-access-mode-target-headers.c uses the analyzer
"sm-fd" which for this use requires (e.g.) that constants
O_ACCMODE, O_RDONLY and O_WRONLY are defined as literal
constants. While for glibc, O_ACCMODE is defined as:
#define O_ACCMODE 0003
in newlib, it's defined as:
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
and the analyzer is not able to make use of an expression
like this (even though O_RDONLY, O_WRONLY and O_RDWR are
defined as literal constants and the whole evaluates to 3).
Better do as for AIX and skip this test.
testsuite:
* gcc.dg/analyzer/fd-access-mode-target-headers.c: Skip for
newlib targets too.
Diff:
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c
index 847d47e0634..cf273b217d1 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-skip-if "" { powerpc*-*-aix* || newlib } } */
#include <sys/stat.h>
#include <fcntl.h>
reply other threads:[~2023-03-01 1:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230301013945.498DE3858D33@sourceware.org \
--to=hp@gcc.gnu.org \
--cc=gcc-cvs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).