From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4311 invoked by alias); 19 Dec 2019 07:26:44 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4299 invoked by uid 89); 19 Dec 2019 07:26:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=Visda.Vokhshoori@microchip.com, H*i:sk:03C1E0D, H*f:sk:03C1E0D, U*Visda.Vokhshoori X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Dec 2019 07:26:43 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBJ7MOWS074953 for ; Thu, 19 Dec 2019 02:26:41 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2x04m9rgju-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Dec 2019 02:26:41 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Dec 2019 07:26:39 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 19 Dec 2019 07:26:36 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBJ7Pq8K49742084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Dec 2019 07:25:52 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC25311C058; Thu, 19 Dec 2019 07:26:35 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E6BD011C04A; Thu, 19 Dec 2019 07:26:34 +0000 (GMT) Received: from kewenlins-mbp.cn.ibm.com (unknown [9.200.146.221]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 19 Dec 2019 07:26:34 +0000 (GMT) Subject: Re: Options disabled under -Os To: Visda.Vokhshoori@microchip.com, gcc@gcc.gnu.org References: <03C1E0D1-57C0-4ED9-9E60-79EFF1FAA90F@microchip.com> From: "Kewen.Lin" Date: Thu, 19 Dec 2019 07:26:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <03C1E0D1-57C0-4ED9-9E60-79EFF1FAA90F@microchip.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit x-cbid: 19121907-0020-0000-0000-00000399CA4C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121907-0021-0000-0000-000021F0F0C9 Message-Id: <12b9b322-845d-3b3d-123d-b963f1768fba@linux.ibm.com> X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00300.txt.bz2 on 2019/12/19 上午12:49, Visda.Vokhshoori@microchip.com wrote: > Hello, > > In GCC documentation, 3.1 Options that Control Optimization: it is indicated -Os disables alignment of functions, jumps, labels, and loops. However, with -v -Q passed to the compile step, I see all these options enabled under -Os. Is this intended behavior, therefore a documentation bug? > I have tried this with GCC4.4.7 and GCC8.3.1 Hi Visda, This issue has been fixed in GCC 9 and trunk. I can reproduce it with gcc 8.3.1 but it's gone with gcc 9.2.1 and latest trunk. I also checked the latest gcc-branch-8 code, they are guarded in OPT_LEVELS_2_PLUS_SPEED_ONLY, so gcc8 just dumps inaccurate information but the behavior should be the same as documentation. BR, Kewen