From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27684 invoked by alias); 8 May 2013 04:28:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27626 invoked by uid 48); 8 May 2013 04:27:52 -0000 From: "thiago at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/57202] New: Please make the intrinsics headers like immintrin.h be usable without compiler flags Date: Wed, 08 May 2013 04:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: thiago at kde dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg00467.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57202 Bug #: 57202 Summary: Please make the intrinsics headers like immintrin.h be usable without compiler flags Classification: Unclassified Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: thiago@kde.org Please make all headers for intrinsics be includable without special compiler flags. In other words, I want the following to work: $ gcc -fsyntax-only -include smmintrin.h -xc /dev/null In file included from :0:0: /usr/lib/gcc/x86_64-redhat-linux/4.7.2/include/smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled" Note it works with ICC: $ icc -fsyntax-only -include smmintrin.h -xc /dev/null && echo works works Not only that, please make all the intrinsics functions be defined and ready to be used. This is necessary so that the following source file could compile even if -msse4.1 is not passed on the command-line (adapted from http://gcc.gnu.org/gcc-4.8/changes.html): #include __attribute__ ((target ("default"))) int foo(void) { return 1; } __attribute__ ((target ("sse4.2"))) int foo(void) { __m128i v; _mm_blendv_epi8(v, v, v); return 2; } There are several reasons for that, number one among them that it makes the GCC 4.8 feature above actually useful for non-trivial code. Also, passing extra options on the command-line are simply not an option for C++ code (where the feature above is useful) if that code is moderately complex and uses inline functions, and those options cannot be used if LTO is to be used (bug 54231).