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
* [Bug target/67946] Function multiversioning ICE
2015-10-12 23:33 [Bug target/67946] New: Function multiversioning ICE evstupac at gmail dot com
@ 2015-10-13 7:44 ` ubizjak at gmail dot com
2015-10-13 8:01 ` evstupac at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2015-10-13 7:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67946
--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
You should compile this with -mavx, otherwise x, y and z global variables get
expanded in BLKmode. So, we get:
(gdb) p code
$1 = PLUS_EXPR
(gdb) p op0
$2 = (rtx) 0x2aaab05a4918
(gdb) p debug_rtx (op0)
(mem/c:BLK (symbol_ref:DI ("z") [flags 0x2] <var_decl 0x2aaab058da20 z>) [1 z+0
S32 A256])
$3 = void
(gdb) p debug_rtx (op1)
(mem/c:BLK (symbol_ref:DI ("y") [flags 0x2] <var_decl 0x2aaab058d990 y>) [1 y+0
S32 A256])
>From gcc-bugs-return-499393-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 13 07:48:47 2015
Return-Path: <gcc-bugs-return-499393-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 104266 invoked by alias); 13 Oct 2015 07:48:47 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 99993 invoked by uid 48); 13 Oct 2015 07:48:43 -0000
From: "gerhard.steinmetz.fortran@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67938] ICE on using assumed rank character with some intrinsics
Date: Tue, 13 Oct 2015 07:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.2.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.de
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:
Message-ID: <bug-67938-4-OhaGCT27TW@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67938-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67938-4@http.gcc.gnu.org/bugzilla/>
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/msg00948.txt.bz2
Content-length: 287
https://gcc.gnu.org/bugzilla/show_bug.cgi?idg938
--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
As meanwhile noticed, example z1.f90 from comment #1 overlaps with PR66833.
Examples z2.f90 (comment #0) and z1s.f90 are describing additional effects.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/67946] Function multiversioning ICE
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
3 siblings, 0 replies; 5+ messages in thread
From: evstupac at gmail dot com @ 2015-10-13 8:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67946
--- Comment #2 from Stupachenko Evgeny <evstupac at gmail dot com> ---
I see, but shouldn't compiler generate en error on this instead of ICE?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/67946] Function multiversioning ICE
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 ` rguenth at gcc dot gnu.org
2021-12-19 4:23 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-13 9:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67946
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-10-13
Component|target |middle-end
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I don't think compiling with -mavx is desired here. The "bug" is that
DECL_MODE doesn't have the same special-casing of vectors as TYPE_MODE has
and ...
/* Holds the machine mode corresponding to the declaration of a variable or
field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a
FIELD_DECL. */
#define DECL_MODE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.mode)
... the comment also is wrong here.
Not sure if we really want to change the above to sth like
#define DECL_MODE(NODE) \
(VECTOR_TYPE_P (TREE_TYPE (NODE)) \
? vector_type_mode (TREE_TYPE (NODE)) \
: DECL_COMMON_CHECK (NODE)->decl_common.mode)
though. Maybe changing references to DECL_MODE to use TYPE_MODE in some
selected places would be enough ...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/67946] Function multiversioning ICE
2015-10-12 23:33 [Bug target/67946] New: Function multiversioning ICE evstupac at gmail dot com
` (2 preceding siblings ...)
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
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-19 4:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67946
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |6.0
Known to work| |10.1.0, 12.0, 6.1.0, 6.4.0,
| |7.1.0, 8.5.0
Resolution|--- |FIXED
Keywords| |ice-on-valid-code
Known to fail| |5.5.0
Status|NEW |RESOLVED
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=79124
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed so closing. Most likely just like PR 79124.
^ 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).