From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 012F13858C52 for ; Tue, 12 Apr 2022 07:07:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 012F13858C52 Received: by mail-ej1-x62c.google.com with SMTP id i27so35397204ejd.9 for ; Tue, 12 Apr 2022 00:07:23 -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:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VNjn2QhP2vhknQq79DlEXQVBeBU3rp/9Ae6sWPBuUS0=; b=02mRQNK6Q4+jHYn8d7CkTe/oHvqmC2LpZPf5W4x261AUZlAKElw90BDnuw5F1D1T5f 4b9/ccPFYtERZ68gV00T1hjxgsjlkYyExLTom37qqgSJ6S70zwS6P/C3OO68FhNsCfkc dVruFsj7E5W9hQ9uPVvm/QFZRJrCnz23rb5Ir1iUM5/T18VHdc4u3cc1McclB2SbzI85 Qrl5NLGMukZRmY+4UEMD/FvXUY5/Ccov9k9MMGUP+UDx9HeR7ta2wKNe1OZQRRTBo6+3 vKKtzuM1MpviP8EEQc0kZE0aLaeT8Fz5gLpIZ4dumuIVTuRgAKAN8K0AhZbGYhfSKJzx lZ1w== X-Gm-Message-State: AOAM5317mHzSdTf8CPJRXZG0XkcsLzcBxpIpTyzb4gSiASd/1z7pnDDz Mqj1ER5jLbkxj5PyWiVJxn8En0Ce6GK0xG05+jfYQNypMyQ= X-Google-Smtp-Source: ABdhPJwd/5attRZymZ4hmt9iW8XYaEgr8G3x+uzGVAZiuBb1kqyctuwQMkUeLXSLpzfKHGZRxVHT2J54mbli96v+Re4= X-Received: by 2002:a17:907:9621:b0:6d7:355d:6da5 with SMTP id gb33-20020a170907962100b006d7355d6da5mr33462701ejc.195.1649747242445; Tue, 12 Apr 2022 00:07:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Tue, 12 Apr 2022 09:07:11 +0200 Message-ID: Subject: Re: testsuite requires LTO? To: Steve Kargl Cc: GCC Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.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, T_SCC_BODY_TEXT_LINE 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 07:07:25 -0000 On Tue, Apr 12, 2022 at 1:53 AM Steve Kargl via Gcc wrote: > > If I configure gcc with the following > > ../gccx/configure --prefix=$HOME/work/x --enable-languages=c,c++,fortran \ > --enable-bootstrap --disable-nls --enable-checking --disable-multilib \ > --disable-libsanitizer --disable-lto. > > then bootstrap gcc, why do I see 1000s of failures with > > % cd gcc > % gmake -j7 check-c > ... > FAIL: gcc.dg/torture/pr64365.c -O2 -flto (test for excess errors) > FAIL: gcc.dg/torture/pr61786.c -O2 -flto (test for excess errors) > FAIL: gcc.dg/torture/pr63380-2.c -O2 -flto (test for excess errors) > FAIL: gcc.dg/torture/pr65270-2.c -O2 -flto (test for excess errors) > > Should the testsuite recognize that gcc is built without LTO support? Yes, it does, in testsuite/lib/gcc-dg.exp if [info exists TORTURE_OPTIONS] { set DG_TORTURE_OPTIONS $TORTURE_OPTIONS } else { # It is theoretically beneficial to group all of the O2/O3 options together, # as in many cases the compiler will generate identical executables for # all of them--and the c-torture testsuite will skip testing identical # executables multiple times. # Also note that -finline-functions is explicitly included in one of the # items below, even though -O3 is also specified, because some ports may # choose to disable inlining functions by default, even when optimizing. set DG_TORTURE_OPTIONS [list \ { -O0 } \ { -O1 } \ { -O2 } \ { -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions } \ { -O3 -g } \ { -Os } ] if [check_effective_target_lto] { # When having plugin test both slim and fat LTO and plugin/nonplugin # path. if [check_linker_plugin_available] { set LTO_TORTURE_OPTIONS [list \ { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \ { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects } ] } else { set LTO_TORTURE_OPTIONS [list \ { -O2 -flto -flto-partition=none } \ { -O2 -flto } ] } so either TORTURE_OPTIONS is set or check_effective_target_lto doesn't work. The check does simply return [check_no_compiler_messages lto object { void foo (void) { } } "-flto"] so I wonder what your excess errors are? The check above should also leave traces in the testsuite log. It might be that --disable-lto doesn't disable gcc -c -flto but just disables lto1 building though. > > -- > Steve