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 <lokeshjanghe...@gmail.com>
Two spaces between date and name and name and <, i.e. 2018-11-20 Lokesh Janghel <lokeshjanghe...@gmail.com> 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