From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D58D83858D20; Fri, 31 Mar 2023 06:09:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D58D83858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680242999; bh=BFS1wDTb+EaQZurUaZnfSBE3lRIxgY27r7+QbLJccYA=; h=From:To:Subject:Date:From; b=MpXkXn2rTMonGWPv7linQcI7iyDp+e4CucLvAkGNPSMz1vlo2aqSJf/DqWQz1h0et aBmNImqFMwngou9Z5kPwKZ/a83HeIRzLB9BqXfWyp3UNxioWLkOFrpsJD19yJkJvb4 PkUvQJ3yfDcsCkEErLdMSu81zUjDQ9sNl8ytffbQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109350] New: FAIL: g++.dg/warn/Wstringop-overflow-4.C Date: Fri, 31 Mar 2023 06:09:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D109350 Bug ID: 109350 Summary: FAIL: g++.dg/warn/Wstringop-overflow-4.C Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- The T (S (2), new int16_t[r_imin_imax + 1]); // { dg-bogus "into a region of size" "pr106120" { xfail { ilp32 && c++98_only } } } subtest now FAILs. Reduced testcase: #include "../../gcc.dg/range.h" #define INT_MAX __INT_MAX__ #define INT_MIN (-INT_MAX - 1) extern "C" char* strcpy (char*, const char*); void sink (void*); #define S36 "0123456789abcdefghijklmnopqrstuvwxyz" #define S(N) (S36 + sizeof S36 - N - 1) #define T(src, alloc) do { \ const char *s =3D src; \ char *d =3D (char*)alloc; \ strcpy (d, s); \ sink (d); \ } while (0) #ifdef __INT16_TYPE__ // Hack around PR 92829. #define XUR(min, max) \ (++idx, (vals[idx] < min || max < vals[idx] ? min : vals[idx])) typedef __INT16_TYPE__ int16_t; void test_strcpy_new_int16_t (size_t n, const size_t vals[]) { size_t idx =3D 0; int r_imin_imax =3D SR (INT_MIN, INT_MAX); T (S (1), new int16_t[r_imin_imax]); T (S (2), new int16_t[r_imin_imax + 1]); // { dg-bogus "into a region of size" "pr106120" { xfail { ilp32 && c++98_only } } } T (S (9), new int16_t[r_imin_imax * 2 + 1]); }=