public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: "haochen.jiang" <haochenj@ecsmtp.sh.intel.com>
Cc: haochen.jiang@intel.com, gcc-patches@gcc.gnu.org,
	 gcc-regression@gcc.gnu.org
Subject: Re: [r13-3761 Regression] FAIL: g++.dg/warn/Warray-bounds-16.C -std=gnu++98 (test for excess errors) on Linux/x86_64
Date: Tue, 8 Nov 2022 09:43:32 +0100	[thread overview]
Message-ID: <CAGm3qMU0darQa_175JdFd9xSMTx1oHVwik-05fQBHYdfJAZeLw@mail.gmail.com> (raw)
In-Reply-To: <202211080822.2A88MiVN1892692@shliclel314.sh.intel.com>

It looks like this was failing on x86-64 before my patch:

In constructor ‘S::S(int)’,
    inlined from ‘void __static_initialization_and_destruction_0()’ at a.c:26:7,
    inlined from ‘(static initializers for a.c)’ at a.c:26:8:
a.c:22:24: warning: ‘void* __builtin_memset(void*, int, long unsigned
int)’ writing between 4 and 85899
34588 bytes into a region of size 0 overflows the destination
[-Wstringop-overflow=]
   22 |       new (p + i) int (); /* { dg-bogus "bounds" "pr102690" {
xfail *-*-* } } */
      |                        ^
a.c:19:51: note: destination object of size 0 allocated by ‘operator new []’
   19 |     p = (int*) new unsigned char [sizeof (int) * m];
      |

and now it's just failing on -m32 as well.

This is the same thing as I reported in PR107561, where
-Wstringop-overflow is getting the same exact IL as before, but some
ranges are different, and it's throwing the warning off.

Aldy

On Tue, Nov 8, 2022 at 9:22 AM haochen.jiang
<haochenj@ecsmtp.sh.intel.com> wrote:
>
> On Linux/x86_64,
>
> a239a63f868e29e9276088e7c0fb00804c2903ba is the first bad commit
> commit a239a63f868e29e9276088e7c0fb00804c2903ba
> Author: Aldy Hernandez <aldyh@redhat.com>
> Date:   Fri Nov 4 22:24:42 2022 +0100
>
>     Improve multiplication by powers of 2 in range-ops.
>
> caused
>
> FAIL: g++.dg/pr71488.C   (test for excess errors)
> FAIL: g++.dg/warn/Warray-bounds-16.C  -std=gnu++14 (test for excess errors)
> FAIL: g++.dg/warn/Warray-bounds-16.C  -std=gnu++17 (test for excess errors)
> FAIL: g++.dg/warn/Warray-bounds-16.C  -std=gnu++20 (test for excess errors)
> FAIL: g++.dg/warn/Warray-bounds-16.C  -std=gnu++98 (test for excess errors)
>
> with GCC configured with
>
> ../../gcc/configure --prefix=/export/users/haochenj/src/gcc-bisect/master/master/r13-3761/usr --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl --enable-libmpx x86_64-linux --disable-bootstrap
>
> To reproduce:
>
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=g++.dg/pr71488.C --target_board='unix{-m32}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=g++.dg/pr71488.C --target_board='unix{-m32\ -march=cascadelake}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=g++.dg/pr71488.C --target_board='unix{-m64}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=g++.dg/pr71488.C --target_board='unix{-m64\ -march=cascadelake}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=g++.dg/warn/Warray-bounds-16.C --target_board='unix{-m32}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=g++.dg/warn/Warray-bounds-16.C --target_board='unix{-m32\ -march=cascadelake}'"
>
> (Please do not reply to this email, for question about this report, contact me at haochen dot jiang at intel.com)
>


      reply	other threads:[~2022-11-08  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08  8:22 haochen.jiang
2022-11-08  8:43 ` Aldy Hernandez [this message]

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=CAGm3qMU0darQa_175JdFd9xSMTx1oHVwik-05fQBHYdfJAZeLw@mail.gmail.com \
    --to=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-regression@gcc.gnu.org \
    --cc=haochen.jiang@intel.com \
    --cc=haochenj@ecsmtp.sh.intel.com \
    /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).