From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62586 invoked by alias); 20 Nov 2018 09:33:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 62489 invoked by uid 89); 20 Nov 2018 09:33:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=vx X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Nov 2018 09:33:30 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13DC130832EB; Tue, 20 Nov 2018 09:33:29 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9729A6013D; Tue, 20 Nov 2018 09:33:28 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wAK9XQDI013274; Tue, 20 Nov 2018 10:33:26 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wAK9XPcq013273; Tue, 20 Nov 2018 10:33:25 +0100 Date: Tue, 20 Nov 2018 09:33:00 -0000 From: Jakub Jelinek To: Lokesh Janghel Cc: umesh.kalappa0@gmail.com, richard.guenther@gmail.com, gcc-patches@gcc.gnu.org Subject: Re: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626 Message-ID: <20181120093325.GX11625@tucnak> Reply-To: Jakub Jelinek References: <20181116112737.GH11625@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg01691.txt.bz2 On Mon, Nov 19, 2018 at 04:08:29PM +0530, Lokesh Janghel wrote: diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ca2e73..b55dfa9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-19 Lokesh Janghel Two spaces between date and name and name and <, i.e. 2018-11-20 Lokesh Janghel in both ChangeLog files. --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr85667-2.c @@ -0,0 +1,15 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -masm=intel" } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-require-effective-target masm_intel } */ +/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax" 1} } */ +typedef struct +{ + float x; +} Float; +Float __attribute__((ms_abi)) fn1 () +{ + Float v; + v.x = 3.145; + return v; +} This test wasn't properly tested: /usr/src/gcc/obj/gcc/xgcc -B/usr/src/gcc/obj/gcc/ -m64 -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -O2 -masm=intel -ffat-lto-objects -fno-ident -c -o pr85667-2.o /usr/src/gcc/gcc/testsuite/gcc.target/i386/pr85667-2.c PASS: gcc.target/i386/pr85667-2.c (test for excess errors) gcc.target/i386/pr85667-2.c: output file does not exist UNRESOLVED: gcc.target/i386/pr85667-2.c scan-assembler-times movl[^\n\r]*, %eax 1 testcase /usr/src/gcc/gcc/testsuite/gcc.target/i386/i386.exp completed in 1 seconds 1) you do not want to use dg-do assemble, but dg-do compile, because only in that case (or when using -save-temps) assembly is produced 2) you do not want to use -masm=intel and then expect AT&T syntax in the regexp Thus, I'd replace all the dg- directive lines with: /* { dg-do compile { target lp64 } } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */ That way, it will work both with -masm=att (explicit or implicit) or -masm=intel. One can use make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32,-m64,-m64/-masm=intel\} i386.exp=pr85667*' to verify and then look at the log file. Furthermore, I'd copy pr85667-1.c test to pr85667-3.c and the modified pr85667-2.c to pr85667-4.c, change Float to Double, float to double, remove f suffixes and adjust all the eax in the regexp to rax, so that you also test the struct with DFmode case. Jakub