Bug 44332 - ICE: in copy_to_mode_reg, at explow.c:623 with -mno-sse2
Summary: ICE: in copy_to_mode_reg, at explow.c:623 with -mno-sse2
Status: RESOLVED DUPLICATE of bug 47948
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-30 13:36 UTC by Zdenek Sojka
Modified: 2021-08-09 06:17 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.8.0
Known to fail: 4.7.1
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-05-30 13:36:49 UTC
Compiler output:
$ gcc -mno-sse2 testcase.c
testcase.c: In function 'foo':
testcase.c:6:6: internal compiler error: in copy_to_mode_reg, at explow.c:635
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r160048 - crash
r153685 - crash
4.4 r158133 - crash

----- testcase.c -----
typedef __attribute__((vector_size(16))) char type;

extern void bar(type);
void foo(type x) { bar(x); }
----------------------


A bit different testcase gives:

$ gcc -mno-sse2 testcase2.c
testcase2.c: In function 'foo':
testcase2.c:4:29: internal compiler error: in emit_move_insn, at expr.c:3428
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

----- testcase2.c -----
typedef __attribute__((vector_size(16))) char type;

extern void bar(type);
void foo(void) { type x; bar(x); }
-----------------------
Comment 1 Richard Biener 2010-05-30 15:21:18 UTC
Well, "doctor it hurts when I do that ..."
Comment 2 Steven Bosscher 2010-05-30 16:55:20 UTC
Should not ICE, though.
Comment 3 serowk 2010-12-17 16:13:45 UTC
Appears with arm-iwmmx-linux-uclibcgnueabi-gcc 4.4.5

1.c:
#include <mmintrin.h>
#include <stdint.h>
#include <stdio.h>

__m64  do_some(__m64 a, int64_t count)
{
    return _mm_srli_pi16(a, count);
}

int main()
{
	__m64 a=(__m64)222LL;
	int64_t b=8;

	b=(int64_t)do_some(a, b);
	printf("%lli\n", b);

	return 0;
}

$ arm-iwmmx-linux-uclibcgnueabi-gcc 1.c -flax-vector-conversions
In file included from 1.c:1:
/opt/arm-iwmmx-linux-uclibcgnueabi/lib/gcc/arm-iwmmx-linux-uclibcgnueabi/4.4.5/include/mmintrin.h: In function '_mm_srli_pi16':
/opt/arm-iwmmx-linux-uclibcgnueabi/lib/gcc/arm-iwmmx-linux-uclibcgnueabi/4.4.5/include/mmintrin.h:526: internal compiler error: in copy_to_mode_reg, at explow.c:623
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 4 Steven Bosscher 2012-11-11 20:53:21 UTC
Passes with GCC 4.7.1 and with current trunk (r193411). Both test cases
from comment #0 do not ICE anymore.

The bug from comment #3 is for another target and therefore unrelated.
Comment 5 Andrew Pinski 2021-08-09 06:17:12 UTC

*** This bug has been marked as a duplicate of bug 47948 ***