From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 0A20F385840A for ; Fri, 29 Jul 2022 08:56:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A20F385840A Received: by mail-lf1-x12c.google.com with SMTP id y11so6391954lfs.6 for ; Fri, 29 Jul 2022 01:56:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=RH7mNQmW21SExH1r9uGG9QqipCjentriIY4CScwn/to=; b=xDD0/LPDFJ59kyHo1StdSOkqNKCHwv9OdYVlzUShc9bTpj/24KhC1sEUuNFRUXHd2T vbasw5ilMLXatHvpDGSubyBWDPZFbn7Ifm0/+GKTBSqpDUW5zS5u91jz5JZxgvmNzPCr rzM2C8JrHFTbX0lV7gHUQXopZZVYPeCHMkK1Srz7NUN/nDiw9ou3Pm61SQMQydVSN23V 1hgrOYD3MifPrhQVShEfdJR7jp8awDjnGuHxZFQ8REylcVbpbW7p2im1L8Q6SsJ6fmow d4fjx65p+/3EmaG0Mqi0GPUd50LzPQ6aBDiUvgdRtBF9gFUrxi315Oq2NxMMvIr6OKve 5WSQ== X-Gm-Message-State: AJIora/0LCRb5BlZ2DsijQKwmQ5zW2Mb4Hpj6ChWqLRR6u1pchp+jbu+ cQ/T38XhluGTfLtmZ647zDEfY4S3dTSv6Gj7I+8s/LLUp30= X-Google-Smtp-Source: AGRyM1vti24loSsAR61M/TkOyZXjfPHKUhEcZUQ5sg/5otn5ecic8lTHBDcXxk+pMOCDxkpvmIoMpYFF3VVal7rRPso= X-Received: by 2002:ac2:504a:0:b0:48a:85f3:dd08 with SMTP id a10-20020ac2504a000000b0048a85f3dd08mr838981lfm.339.1659084993693; Fri, 29 Jul 2022 01:56:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6500:13d2:b0:14c:a7e:9f14 with HTTP; Fri, 29 Jul 2022 01:56:32 -0700 (PDT) From: Amol Date: Fri, 29 Jul 2022 14:26:32 +0530 Message-ID: Subject: False warnings on arm-gcc? To: gcc-help Cc: suratiamol Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 08:56:38 -0000 Hello, The compilation of a program at [1] raises warnings which say that it attempted to write beyond the buffer when it did not. Cmdline given to godbolt's arm-gcc-trunk(Linux) compiler: -O3 -mno-unaligned-access -ffreestanding -mfloat-abi=soft Changing O3 to O2, or defaulting to hard float-abi, or removing -mno-unaligned-access, or removing -ffreestanding - any one these four steps result in a compilatoin with no warnings at all. Is it because of any alignment or other issues that the program has neglected? Thanks, Amol [1] https://godbolt.org/z/rGvxP5qsr