From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 47F353858C52 for ; Tue, 12 Apr 2022 07:27:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47F353858C52 Received: by mail-ej1-x633.google.com with SMTP id r13so35530177ejd.5 for ; Tue, 12 Apr 2022 00:27:11 -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=8w6RqI98hAYDdiEqTzlbgh0YejDVXDXIqjPEBayGx/w=; b=iLZjIojpkj5/FDBxXwatbLtDs4GJkXheinGOaCJ89QnZnqBivBH6Tr1ixdLZOW1UIt 5krql4lkd/fUCz6zFfV56EWduh+BC1WtICpaip1PtyaRUCzKXsoMl6hMmPZvdHoIdgw4 eFXmB9SwpgOc/dqY55nO6/vLb9Xz7yZM7O9Aw42zMSmRULNgEIU1pDSk1bBbBjqE+nvF /USa3Yds4UyFXWf0mzMFf2Hmoo2fjOu9yKP5ilLXmaKSqVkxmph8sI0aROyjTrq6IlGk 40+bxWs/WVBw7xU/zXHsjHX/wjMNgVmfQq/KcUFjMA6RYE7/XJDtDOy+sh2ll8h6E3P4 Oe5g== X-Gm-Message-State: AOAM531Q/w0luzCwe9MDfav5PQOcaVBp/FAlnX4xG8RjqW4ZKBpTlAmP lf81gf+PkkWpx0/BFnnZ5URvojAVxEs1lL1TUHV0upnVcUM= X-Google-Smtp-Source: ABdhPJw3R1F3DKQ8y4qmu4idR9Fb8Wxk+B1JiI1GYiU8GnAjqdQ1MAJW1VT4EXA3G0wOiEA2nhNL93PTw9BS23om9SY= X-Received: by 2002:a17:907:3e0d:b0:6e0:daaa:63e0 with SMTP id hp13-20020a1709073e0d00b006e0daaa63e0mr33043547ejc.657.1649748429575; Tue, 12 Apr 2022 00:27:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Tue, 12 Apr 2022 09:26:58 +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.4 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:27:13 -0000 On Tue, Apr 12, 2022 at 9:07 AM Richard Biener wrote: > > 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. I checked and it works fine for me, --disable-lto disables LTO support and there's no extra FAILs in dg-torture.exp. The testsuite log has Executing on host: /tmp/obj/gcc/xgcc -B/tmp/obj/gcc/ -fdiagnostics-plain-output -flto -c -o lto10207.o lto10207.c (timeout = 300) spawn -ignore SIGHUP /tmp/obj/gcc/xgcc -B/tmp/obj/gcc/ -fdiagnostics-plain-output -flto -c -o lto10207.o lto10207.c^M cc1: error: LTO support has not been enabled in this configuration^M compiler exited with status 1 which causes no -flto to be used. Richard. > > > > > -- > > Steve