From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4F6E23857B9E for ; Tue, 8 Nov 2022 08:43:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F6E23857B9E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667897025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LxF/xrCobOYSwxebBPgeiFGun9/NAvRBQAvJI9dcQ24=; b=TD8cWORb4BBopC4c/lG2JpmAEoscHdvGcv6EVafZI0GZ+PYT7wkZcXUywiXLuOAgcToCfW ZZcG6tdTDCznY8JswrAgiwVNMf3O424zC0VQBrzn+cgkNmcla1JtFZGfrwoSk+vpIwSEUK rf1S5nhv9YGQbC7eNig34z5QdvFYHy0= Received: from mail-yb1-f199.google.com (mail-yb1-f199.google.com [209.85.219.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-102-K3NrQZvJMoGI-UH-LgRShQ-1; Tue, 08 Nov 2022 03:43:44 -0500 X-MC-Unique: K3NrQZvJMoGI-UH-LgRShQ-1 Received: by mail-yb1-f199.google.com with SMTP id b142-20020a253494000000b006ca86d5f40fso13530094yba.19 for ; Tue, 08 Nov 2022 00:43:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LxF/xrCobOYSwxebBPgeiFGun9/NAvRBQAvJI9dcQ24=; b=0ArWM/PGA/ulAFZPzG+XRdXB/mZwj3pYt9eYMgzAKiip5FSwu0YiZIs85TtGW36lfZ BKBIlYA46yJzXL5+N6ajHQjmuhqtlR59d4nqBbj0vmdzw8MU6kTUFmws6tkc/i9+tjZL in42zX5UA7i875dHXOHwjsHOoY2BPDk40HHpElsBEfFoqM/UcM3333gGBRwL6Z2QIKPz nYW+ogi2HOwwGE+ULCJILfXB/OwZcbMuvSTBnxBE+oEBQ+U/a8xnYG7F0eJolFJxttWJ TW139TtcbjjpROh+TwKPrEJxvtAjE+KnLpMbIWa4UpTmUgmFjKJoGPdCMa8HGjDOS+BA aoBA== X-Gm-Message-State: ACrzQf056QETpF0XRHoQnVUkSbiS2ftIIsNu42ec4PATFaPnN2ngIbyO suFxdOZ56meM1iHaJGxS8Y99Gc9qTZlpPwuxxiR42ZlvpqUHkBpL58p+4btOlMbZoSf36euTt95 dNO/ZFq9KTGYbMvvHNr+iDiC81Q11Z36ea15E6A== X-Received: by 2002:a05:6902:13c8:b0:6af:f2b8:e164 with SMTP id y8-20020a05690213c800b006aff2b8e164mr52423430ybu.466.1667897024094; Tue, 08 Nov 2022 00:43:44 -0800 (PST) X-Google-Smtp-Source: AMsMyM5bP+ZoObfnJ4QH7Gz+y0s5WzIkSnpy4L/Ob73Y5MX+sL74t7En4/cyxJhi26wvQrZPSINXhQz7l+GbSEPaauI= X-Received: by 2002:a05:6902:13c8:b0:6af:f2b8:e164 with SMTP id y8-20020a05690213c800b006aff2b8e164mr52423411ybu.466.1667897023801; Tue, 08 Nov 2022 00:43:43 -0800 (PST) MIME-Version: 1.0 References: <202211080822.2A88MiVN1892692@shliclel314.sh.intel.com> In-Reply-To: <202211080822.2A88MiVN1892692@shliclel314.sh.intel.com> From: Aldy Hernandez Date: Tue, 8 Nov 2022 09:43:32 +0100 Message-ID: Subject: Re: [r13-3761 Regression] FAIL: g++.dg/warn/Warray-bounds-16.C -std=gnu++98 (test for excess errors) on Linux/x86_64 To: "haochen.jiang" Cc: haochen.jiang@intel.com, gcc-patches@gcc.gnu.org, gcc-regression@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: It looks like this was failing on x86-64 before my patch: In constructor =E2=80=98S::S(int)=E2=80=99, inlined from =E2=80=98void __static_initialization_and_destruction_0()= =E2=80=99 at a.c:26:7, inlined from =E2=80=98(static initializers for a.c)=E2=80=99 at a.c:26:= 8: a.c:22:24: warning: =E2=80=98void* __builtin_memset(void*, int, long unsign= ed int)=E2=80=99 writing between 4 and 85899 34588 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=3D] 22 | new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */ | ^ a.c:19:51: note: destination object of size 0 allocated by =E2=80=98operato= r new []=E2=80=99 19 | p =3D (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 wrote: > > On Linux/x86_64, > > a239a63f868e29e9276088e7c0fb00804c2903ba is the first bad commit > commit a239a63f868e29e9276088e7c0fb00804c2903ba > Author: Aldy Hernandez > 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=3Dgnu++14 (test for excess err= ors) > FAIL: g++.dg/warn/Warray-bounds-16.C -std=3Dgnu++17 (test for excess err= ors) > FAIL: g++.dg/warn/Warray-bounds-16.C -std=3Dgnu++20 (test for excess err= ors) > FAIL: g++.dg/warn/Warray-bounds-16.C -std=3Dgnu++98 (test for excess err= ors) > > with GCC configured with > > ../../gcc/configure --prefix=3D/export/users/haochenj/src/gcc-bisect/mast= er/master/r13-3761/usr --enable-clocale=3Dgnu --with-system-zlib --with-dem= angler-in-ld --with-fpmath=3Dsse --enable-languages=3Dc,c++,fortran --enabl= e-cet --without-isl --enable-libmpx x86_64-linux --disable-bootstrap > > To reproduce: > > $ cd {build_dir}/gcc && make check RUNTESTFLAGS=3D"dg.exp=3Dg++.dg/pr7148= 8.C --target_board=3D'unix{-m32}'" > $ cd {build_dir}/gcc && make check RUNTESTFLAGS=3D"dg.exp=3Dg++.dg/pr7148= 8.C --target_board=3D'unix{-m32\ -march=3Dcascadelake}'" > $ cd {build_dir}/gcc && make check RUNTESTFLAGS=3D"dg.exp=3Dg++.dg/pr7148= 8.C --target_board=3D'unix{-m64}'" > $ cd {build_dir}/gcc && make check RUNTESTFLAGS=3D"dg.exp=3Dg++.dg/pr7148= 8.C --target_board=3D'unix{-m64\ -march=3Dcascadelake}'" > $ cd {build_dir}/gcc && make check RUNTESTFLAGS=3D"dg.exp=3Dg++.dg/warn/W= array-bounds-16.C --target_board=3D'unix{-m32}'" > $ cd {build_dir}/gcc && make check RUNTESTFLAGS=3D"dg.exp=3Dg++.dg/warn/W= array-bounds-16.C --target_board=3D'unix{-m32\ -march=3Dcascadelake}'" > > (Please do not reply to this email, for question about this report, conta= ct me at haochen dot jiang at intel.com) >