http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53425
Bug #: 53425 Summary: No warnings are given for -mno-sse Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: hjl.to...@gmail.com CC: ubiz...@gmail.com Target: x86-64 [hjl@gnu-mic-2 pr53383]$ cat z.c typedef double __v2df __attribute__ ((__vector_size__ (16))); extern __v2df x; extern void bar (__v2df); void foo (void) { bar (x); } [hjl@gnu-mic-2 pr53383]$ make z.s /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -mno-sse -S z.c [hjl@gnu-mic-2 pr53383]$ cat z.s .file "z.c" .text .p2align 4,,15 .globl foo .type foo, @function foo: .LFB0: .cfi_startproc subq $40, %rsp .cfi_def_cfa_offset 48 movq x(%rip), %rax movq %rax, (%rsp) movq x+8(%rip), %rax movq %rax, 8(%rsp) call bar addq $40, %rsp .cfi_def_cfa_offset 8 ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (GNU) 4.8.0 20120519 (experimental)" .section .note.GNU-stack,"",@progbits [hjl@gnu-mic-2 pr53383]$ But we do issue a warning for 32-bit: [hjl@gnu-mic-2 pr53383]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -mno-sse -S z.c -m32 z.c: In function \u2018foo\u2019: z.c:9:7: warning: SSE vector argument without SSE enabled changes the ABI [enabled by default] bar (x); ^ z.c:9:7: note: The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6 [hjl@gnu-mic-2 pr53383]$ I believe we should also issue a warning for 64-bit.