From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id D712F3893642 for ; Thu, 8 Jul 2021 13:48:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D712F3893642 Received: by mail-pg1-x535.google.com with SMTP id a2so6003195pgi.6 for ; Thu, 08 Jul 2021 06:48:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0z8iTQW4ma6EcjRRY5AUpAwdz4+wMnfe+Jt9ziW6TP8=; b=nSvZ2gvDkGshK1hYrGmML/zvJuU9wXZ5EAIf/wZ49UxskGhjP8K+PIVUFtGGhtI+JQ JWqovhjL2MqlcurRNg8rpJz9BHukxgW1WpBpCJCYMODn0XenN77AUaMKIXd6+lIe1DwN YwmtC2ptf4KwdNSgOn5FkStYrn8AMdn7A1LRsI/2c85/ALRHU5Cbb/SZM35f3fphAGGA pM57MLZLj5trEw58/pe7kRWIJgz75F8l/DHTgIXJ3f4znKcunY8l/oBjFxH7BdtUgjgp biIe0vXiGRiBMGEzVnAmXzdyilnkET9QM+3Zk9sXRj39eIv4RwIo7pDk7D2cxznGQExd /6Jg== X-Gm-Message-State: AOAM532EEfzZLNOJwUMhBc+lYvzWKTHdk5oYsThro9hX1kYgTu1bLL7s 2YLZ2CN8fQ1Iu0QfCCgwfNGA6x7rdXThm+Ww3L9bLQ== X-Google-Smtp-Source: ABdhPJxDEWQb8WPvSkTQ0uEe7X7FXS6Gu5lb2Qy6YKWYoMzjFUqvPbuuIIoLF5dGRc0PFXf5aC9QARiGweiMYmbNuGU= X-Received: by 2002:a63:5064:: with SMTP id q36mr31833838pgl.196.1625752102789; Thu, 08 Jul 2021 06:48:22 -0700 (PDT) MIME-Version: 1.0 References: <63b26859-944b-cfbf-64a3-e70c73c09727@gmail.com> <91a3a6e6-7297-d7e2-5df2-e25fc5d18fac@gmail.com> <878s2hm6jo.fsf@igel.home> In-Reply-To: <878s2hm6jo.fsf@igel.home> From: Christophe Lyon Date: Thu, 8 Jul 2021 15:48:11 +0200 Message-ID: Subject: Re: PING 2 [PATCH] correct handling of variable offset minus constant in -Warray-bounds (PR 100137) To: Andreas Schwab Cc: Marek Polacek via Gcc-patches , Marek Polacek Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2021 13:48:25 -0000 On Thu, 8 Jul 2021 at 12:42, Andreas Schwab wrote: > > On Jul 07 2021, Marek Polacek via Gcc-patches wrote: > > > On Wed, Jul 07, 2021 at 02:38:11PM -0600, Martin Sebor via Gcc-patches wrote: > >> I certainly will. Pushed in r12-2132. > > > > I think this patch breaks bootstrap on x86_64: > > It also breaks bootstrap on aarch64 and ia64 in stage2. > > In file included from ../../gcc/c-family/c-common.h:26, > from ../../gcc/cp/cp-tree.h:40, > from ../../gcc/cp/module.cc:209: > In function 'tree_node* identifier(const cpp_hashnode*)', > inlined from 'bool module_state::read_macro_maps()' at ../../gcc/cp/module.cc:16305:10: > ../../gcc/tree.h:1089:58: error: array subscript -1 is outside array bounds of 'cpp_hashnode [288230376151711743]' [-Werror=array-bounds] > 1089 | ((tree) ((char *) (NODE) - sizeof (struct tree_common))) > | ^ > ../../gcc/cp/module.cc:277:10: note: in expansion of macro 'HT_IDENT_TO_GCC_IDENT' > 277 | return HT_IDENT_TO_GCC_IDENT (HT_NODE (const_cast (node))); > | ^~~~~~~~~~~~~~~~~~~~~ > In file included from ../../gcc/tree.h:23, > from ../../gcc/c-family/c-common.h:26, > from ../../gcc/cp/cp-tree.h:40, > from ../../gcc/cp/module.cc:209: > ../../gcc/tree-core.h: In member function 'bool module_state::read_macro_maps()': > ../../gcc/tree-core.h:1445:24: note: at offset -24 into object 'tree_identifier::id' of size 16 > 1445 | struct ht_identifier id; > | ^~ > > Andreas. > on arm-linux-gnueabi, it breaks in: libatomic/config/linux/arm/host-config.h:42:34: error: array subscript 0 is outside array bounds of 'unsigned int[0]' [-Werror=array-bounds] Christophe > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."