public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX <fxcoudert@gmail.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: GCC Mailing List <gcc@gcc.gnu.org>, Iain Sandoe <iain@sandoe.co.uk>
Subject: Re: Many analyzer failures on non-Linux system (x86_64-apple-darwin)
Date: Sat, 15 Jan 2022 15:19:13 +0100	[thread overview]
Message-ID: <650EE35B-A344-49B7-8361-303B88696A3F@gmail.com> (raw)
In-Reply-To: <c85eb1c5c522d6fad9b08887474258d84882c7bf.camel@redhat.com>

Hi David,

> The purpose of these asm tests is to verify that the analyzer doesn't
> get confused by various inline assembler directives used in the source
> of the Linux kernel.  So in theory they ought to work on any host, with
> a gcc configured for a suitable target.
> 
> These tests are marked with "dg-do assemble" directives, which I'd
> hoped would mean it uses -S for the tests (to make a .s file), but
> looking at a log locally, it appears to be using -c (to make a .o
> file), so maybe that's what's going wrong for you as well?

The tests even compiled with -S still fail:

spawn -ignore SIGHUP /Users/fx/ibin/gcc/xgcc -B/Users/fx/ibin/gcc/ exceptions_enabled42475.cc -fdiagnostics-plain-output -S -o excep
tions_enabled42475.s
FAIL: gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c   -O1  (test for excess errors)
Excess errors:
/Users/fx/gcc/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c:27:3: warning: 'asm' operand 6 probably does not match constraints
/Users/fx/gcc/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c:27:3: error: impossible constraint in 'asm'

It’s the same for the other four.


gcc.dg/analyzer/asm-x86-lp64-1.c is slightly different, there it’s an assembler error:


/var/folders/_8/7ft0tbns6_l87s21n4s_1sc80000gn/T//cc4b3ybm.s:160:20: error:unexpected token in '.section' directive
        .pushsection .text
                          ^
/var/folders/_8/7ft0tbns6_l87s21n4s_1sc80000gn/T//cc4b3ybm.s:162:2: error: unknown directive
        .type add_asm, @function
        ^
/var/folders/_8/7ft0tbns6_l87s21n4s_1sc80000gn/T//cc4b3ybm.s:167:13: error: .popsection without corresponding .pushsection
        .popsection
                   ^



>>> ## Builtin-related failures
>>> 
>>> Those four cases fail:
>>> 
>>> gcc.dg/analyzer/data-model-1.c
>>> gcc.dg/analyzer/pr103526.c
>>> gcc.dg/analyzer/taint-size-1.c
>>> gcc.dg/analyzer/write-to-string-literal-1.c
> 
> Can you file a bug about this and attach the preprocessed source from
> the test (using -E).

Done, it is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104042


FX

  reply	other threads:[~2022-01-15 14:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 21:49 FX
2022-01-10 16:13 ` FX
2022-01-10 20:58   ` David Malcolm
2022-01-15 14:19     ` FX [this message]
2022-01-15 14:31       ` Iain Sandoe
2022-01-16  1:35     ` Hans-Peter Nilsson
2022-01-16 11:11       ` FX
2022-01-21  0:08         ` [PATCH] testsuite: avoid analyzer asm failures on non-Linux David Malcolm
2022-02-07 17:08           ` FX
2022-02-07 23:35             ` David Malcolm

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=650EE35B-A344-49B7-8361-303B88696A3F@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /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).