From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89304 invoked by alias); 12 Oct 2015 23:33:41 -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 89270 invoked by uid 48); 12 Oct 2015 23:33:36 -0000 From: "evstupac at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67946] New: Function multiversioning ICE Date: Mon, 12 Oct 2015 23:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: evstupac at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg00939.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67946 Bug ID: 67946 Summary: Function multiversioning ICE Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: evstupac at gmail dot com Target Milestone: --- The following test: #include __m256 x, y, z; __attribute__((target("avx"))) int bar() { x = _mm256_add_ps (y, z); return 1; } __attribute__((target("default"))) int bar() { return 2; } int foobar() { if (__builtin_cpu_supports ("avx")) return bar(); else return 0; } __attribute__((target("sse3"))) int foo(int i) { return foobar() + 1; } __attribute__((target("default"))) int foo(int i) { return foobar() + 2; } ICE by: gcc test.cpp -O3 -S -msse4.2 test.cpp: In function 'int bar()': test.cpp:8:27: internal compiler error: in expand_expr_real_2, at expr.c:9322 x = _mm256_add_ps (y, z); ^ 0x9e0445 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /export/users/gnutester/stability/svn/trunk/gcc/expr.c:9322 0x9cd8da expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /export/users/gnutester/stability/svn/trunk/gcc/expr.c:9523 0x9d7f62 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, tree_node*) /export/users/gnutester/stability/svn/trunk/gcc/expr.c:5399 0x9da55d expand_assignment(tree_node*, tree_node*, bool) /export/users/gnutester/stability/svn/trunk/gcc/expr.c:5171 0x8cb1de expand_gimple_stmt_1 /export/users/gnutester/stability/svn/trunk/gcc/cfgexpand.c:3581 0x8cb1de expand_gimple_stmt /export/users/gnutester/stability/svn/trunk/gcc/cfgexpand.c:3677 0x8cd511 expand_gimple_basic_block /export/users/gnutester/stability/svn/trunk/gcc/cfgexpand.c:5681 0x8d41f6 execute /export/users/gnutester/stability/svn/trunk/gcc/cfgexpand.c:6293 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.