From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 0AF06385E007; Wed, 6 Apr 2022 15:26:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0AF06385E007 Received: by mail-pj1-x1029.google.com with SMTP id bx5so2870542pjb.3; Wed, 06 Apr 2022 08:26:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=HvR8ZCbsz26WzQuFbbhC4acMV878XHjHQXQYvyo2PgI=; b=BE0NnLvLQHo6cVLp11OLwaULzTh9XW1w2WnxBRvqqzXqEnwgoipadtlt2AKJ4qWwSL KI6goxyuNk9x+qk9OyK00YcWHLiOJbC0VaRK3K7iIn2rd6LnP2Xz5yYL2BecQJsVyvP5 kID6YQegEi6A8r6Cfek/dBi4S46aNYG1C2qXApLccv2EtQpmGe2G4WY3bfAZo/k3wPYA 9a++vQQA38a4sBeMHysEXFwgpXv+sCy+9ouZ6qaipa2oaBVYg1eRCpZkzGfzpGqzR67o nPLeYBeezpXKxa0RWgC5PNtgWIukWXufX6/Kz2haBgAM70Op/0GJCkIsjukyP1374LWC FJ+g== X-Gm-Message-State: AOAM531MTXVec3sTsxB7iKM6V0EIP2Fgv0nuVhwk3ozQc44R5BMvUPvV j6M5HiKeiqJ5I1r+v6tewwY= X-Google-Smtp-Source: ABdhPJwnMi2WjPHsAM0e2KJjK1oCfnhBOvxwxlDwFv4WFRdXozt2PLdTtLgTO2RhLa6o2XQ+V6P0Mw== X-Received: by 2002:a17:902:e543:b0:156:c93c:6a13 with SMTP id n3-20020a170902e54300b00156c93c6a13mr9358465plf.60.1649258798983; Wed, 06 Apr 2022 08:26:38 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id ev16-20020a17090aead000b001c7c2919453sm5957210pjb.33.2022.04.06.08.26.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Apr 2022 08:26:38 -0700 (PDT) Message-ID: <4fd4e524-92f4-d5e4-f44b-cf6d53eddf44@gmail.com> Date: Wed, 6 Apr 2022 09:26:37 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] sh: Fix up __attribute__((optimize ("Os"))) handling on SH [PR105069] Content-Language: en-US To: Jakub Jelinek , Alexandre Oliva , Oleg Endo Cc: gcc-patches@gcc.gnu.org, =?UTF-8?Q?Martin_Li=c5=a1ka?= References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, 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-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: Wed, 06 Apr 2022 15:26:41 -0000 On 3/31/2022 2:30 AM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, various tests on sh-elf ICE like: > make check-gcc RUNTESTFLAGS="compile.exp='pr104327.c pr58332.c pr81360.c pr84425.c'" > FAIL: gcc.c-torture/compile/pr104327.c -O0 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr104327.c -O0 (test for excess errors) > FAIL: gcc.c-torture/compile/pr104327.c -O1 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr104327.c -O1 (test for excess errors) > FAIL: gcc.c-torture/compile/pr104327.c -O2 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr104327.c -O2 (test for excess errors) > FAIL: gcc.c-torture/compile/pr104327.c -O3 -g (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr104327.c -O3 -g (test for excess errors) > FAIL: gcc.c-torture/compile/pr104327.c -Os (test for excess errors) > FAIL: gcc.c-torture/compile/pr58332.c -O0 (test for excess errors) > FAIL: gcc.c-torture/compile/pr58332.c -O1 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr58332.c -O1 (test for excess errors) > FAIL: gcc.c-torture/compile/pr58332.c -O2 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr58332.c -O2 (test for excess errors) > FAIL: gcc.c-torture/compile/pr58332.c -O3 -g (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr58332.c -O3 -g (test for excess errors) > FAIL: gcc.c-torture/compile/pr58332.c -Os (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr58332.c -Os (test for excess errors) > FAIL: gcc.c-torture/compile/pr81360.c -O0 (test for excess errors) > FAIL: gcc.c-torture/compile/pr81360.c -O1 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr81360.c -O1 (test for excess errors) > FAIL: gcc.c-torture/compile/pr81360.c -O2 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr81360.c -O2 (test for excess errors) > FAIL: gcc.c-torture/compile/pr81360.c -O3 -g (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr81360.c -O3 -g (test for excess errors) > FAIL: gcc.c-torture/compile/pr81360.c -Os (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr81360.c -Os (test for excess errors) > FAIL: gcc.c-torture/compile/pr84425.c -O0 (test for excess errors) > FAIL: gcc.c-torture/compile/pr84425.c -O1 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr84425.c -O1 (test for excess errors) > FAIL: gcc.c-torture/compile/pr84425.c -O2 (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr84425.c -O2 (test for excess errors) > FAIL: gcc.c-torture/compile/pr84425.c -O3 -g (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr84425.c -O3 -g (test for excess errors) > FAIL: gcc.c-torture/compile/pr84425.c -Os (internal compiler error: 'global_options' are modified in local context) > FAIL: gcc.c-torture/compile/pr84425.c -Os (test for excess errors) > With the following patch, none of those tests ICE anymore, though > pr104327.c still FAILs with: > Excess errors: > /usr/src/gcc/gcc/testsuite/gcc.c-torture/compile/pr104327.c:6:1: error: inlining failed in call to 'always_inline' 'bar': target specific option mismatch > I think that would be fixable by overriding TARGET_CAN_INLINE_P > hook and allowing at least for always_inline changes in sh_div_str. > > Is the following patch ok for trunk as at least a small step forward? > > 2022-03-31 Jakub Jelinek > > PR target/105069 > * config/sh/sh.opt (mdiv=): Add Save. OK.   IIRC sh isn't the only target that's broken for this stuff. Jeff