User account creation filtered due to spam.

Bug 22462 - [4.0 regression] with -O2 -ffast-math -mfpmath=sse -msse: could not split insn: internal compiler error: in final_scan_insn, at final.c:2508
Summary: [4.0 regression] with -O2 -ffast-math -mfpmath=sse -msse: could not split ins...
Status: RESOLVED DUPLICATE of bug 17692
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.1
: P2 normal
Target Milestone: 4.0.2
Assignee: Richard Henderson
URL:
Keywords: ice-on-valid-code, ssemmx
Depends on:
Blocks:
 
Reported: 2005-07-13 17:37 UTC by Simon C
Modified: 2005-07-28 20:55 UTC (History)
2 users (show)

See Also:
Host: i486-linux-gnu
Target: i486-linux-gnu
Build: i486-linux-gnu
Known to work: 4.1.0 3.4.0
Known to fail: 4.0.1
Last reconfirmed: 2005-07-28 17:27:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon C 2005-07-13 17:38:00 UTC
bug.cpp: In function 'void func()': 
bug.cpp:45: error: could not split insn 
(insn:HI 106 27 115 (parallel [ 
            (set (reg/v:SF 21 xmm0 [orig:59 _max.21 ] [59]) 
                (if_then_else:SF (le:SF (reg/v:SF 21 xmm0 [orig:59 _max.21 ] 
[59]) 
                        (reg/v:SF 21 xmm0 [orig:59 _max.21 ] [59])) 
                    (reg/v:SF 21 xmm0 [orig:59 _max.21 ] [59]) 
                    (reg/v:SF 21 xmm0 [orig:59 _max.21 ] [59]))) 
            (clobber (reg:V4SF 23 xmm2)) 
        ]) 658 {*movsfcc_1_sse} (insn_list:REG_DEP_TRUE 27 (nil)) 
    (expr_list:REG_UNUSED (reg:V4SF 23 xmm2) 
        (nil))) 
bug.cpp:45: internal compiler error: in final_scan_insn, at final.c:2508 
 
System: Debian unstable with Athlon-XP. 
 
Target: i486-linux-gnu 
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib --enable-nls 
--without-included-gettext --enable-threads=posix --program-suffix=-4.0 
--enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk 
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr 
--disable-werror --enable-checking=release i486-linux-gnu 
Thread model: posix 
gcc version 4.0.1 (Debian 4.0.1-2) 
 
Also happens with 4.0.0. 
 
I have created a self contained test case, which follows. Note that even 
apparently minor changes to this test case prevent the bug triggering. 
Use: g++ -O2 -ffast-math -mfpmath=sse -msse -c bug.cpp 
(-O3 also works) 
---------------------------------------- 
typedef float float_t; // type double does not trigger the bug 
 
struct Slot 
{ 
	virtual void invoke () {} 
}; 
 
struct Range 
{ 
	float_t  min; 
	float_t  max; 
 
	void set (float_t _min, float_t _max) 
	{ 
		min = _min; 
		max = _max; 
	} 
}; 
 
#define MAX(a,b) (((a) > (b)) ? (a) : (b)) 
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) 
 
struct Parameter 
{ 
	Slot*   m_slot; 
	float   m_value;  // type of m_value does not influence the bug 
	Range   m_range; 
 
	void init (float_t min, float_t max, float_t value) 
	{ 
		m_range.set (min, max); 
		m_value = MAX (m_range.min, MIN (m_range.max, value)); 
		m_slot->invoke(); 
	} 
}; 
 
const unsigned count = 2; // count must be > 1 to trigger the bug 
const float upper = 10.0f; // values of 0.0f, 1.0f do not trigger the bug 
Parameter params[count]; 
 
void func() 
{ 
	for (unsigned i = 0; i < count; i++) 
		params[i].init (0, upper, upper); // bug triggered from here 
}
Comment 1 Andrew Pinski 2005-07-13 18:36:25 UTC
Confirmed, a 4.0 regression only.
Comment 2 Richard Henderson 2005-07-28 17:27:00 UTC
May be a duplicate of PR17692.
Comment 3 Richard Henderson 2005-07-28 20:55:15 UTC

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