From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D68EA384F4B0; Fri, 18 Nov 2022 13:39:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D68EA384F4B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668778785; bh=ASPtep/u0Gksq4qpAxelJp71qlmopYucQBq2CRayq8U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XzmzpAyCz6BpfyXXDU8IVgAPC0H5j4wI2KUA+KunDQaGtGruztaPuwP9DxjhNLkc7 8iDSS0D+yewFD0RelafnmOuM1kGd0qswoJKQLUDvPZS4t8EiOtMWAyc0/6ZdyrXCSr 3wpGBcd+nGgLJPTgSh0zzXCNN7NACaIwRM/uwohs= From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107750] Many gcc.dg/analyzer/fd-*.c tests FAIL Date: Fri, 18 Nov 2022 13:39:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107750 --- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #2 from David Malcolm --- > Sorry about the breakage; thanks for filing this, and for the patch. > > Looking at: > FAIL: gcc.dg/analyzer/fd-access-mode-target-headers.c (test for warnin= gs, > line 53) > it looks like the analyzer was able to figure out the values of O_RDONLY = and > O_WRONLY in your headers, but not of O_ACCMODE. I suspect it might be ha= ving > issues with SOCK_STREAM and SOCK_DGRAM also. > > How are these values defined in your headers? The analyzer has gained so= me > ability to try to e.g. scrape macro values from the C frontend, but only = some > cases are supported. : #define O_ACCMODE (O_SEARCH | O_EXEC | 0x3) :=20=20=20=20=20=20=20=20=20=20 #if !defined(_XPG4_2) || defined(__EXTENSIONS__) #define SOCK_STREAM NC_TPI_COTS /* stream socket */ #define SOCK_DGRAM NC_TPI_CLTS /* datagram socket */ #define SOCK_RAW NC_TPI_RAW /* raw-protocol interface */ #else #define SOCK_STREAM 2 /* stream socket */ #define SOCK_DGRAM 1 /* datagram socket */ #define SOCK_RAW 4 /* raw-protocol interface */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ NC_TPI_COTS is also 2, same for the other two. > There's a way of debugging this using -fdump-analyzer, but I'm looking at > adding a way to make such issues show up more clearly in the DejaGnu logs, > which hopefully should make them easier to track down. That would certainly be nice. Thanks. Rainer=