public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/67946] New: Function multiversioning ICE
@ 2015-10-12 23:33 evstupac at gmail dot com
  2015-10-13  7:44 ` [Bug target/67946] " ubizjak at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: evstupac at gmail dot com @ 2015-10-12 23:33 UTC (permalink / raw)
  To: gcc-bugs

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 <immintrin.h>

__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 <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-19  4:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 23:33 [Bug target/67946] New: Function multiversioning ICE evstupac at gmail dot com
2015-10-13  7:44 ` [Bug target/67946] " ubizjak at gmail dot com
2015-10-13  8:01 ` evstupac at gmail dot com
2015-10-13  9:30 ` [Bug middle-end/67946] " rguenth at gcc dot gnu.org
2021-12-19  4:23 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).