public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
@ 2004-04-23 15:09 ahu at ds9a dot nl
  2004-04-23 15:13 ` [Bug optimization/15101] " ahu at ds9a dot nl
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ahu at ds9a dot nl @ 2004-04-23 15:09 UTC (permalink / raw)
  To: gcc-bugs

The documentation claims that gcc can write out double precision floating point
arithmetic if the hardware can't do it SIMD. 

When compiling with -O3, this results in the ICE above, when compiling without
-O, it produces bogus results.

Compiled with:
gcc -Wall -ggdb -march=pentium3 -msse simd.c -o simd -O3

Code:
typedef int v4df __attribute__ ((mode(V4DF)));
typedef int v4sf __attribute__ ((mode(V4SF)));

union dvector4
{
  v4df vect;
  double e[4];
};

union fvector4
{
  v4sf vect;
  float e[4];
};


int main()
{
  int n;
  union dvector4 a, b;

  a.e[0]=0;
  a.e[1]=10;
  a.e[2]=20;
  a.e[3]=30;

  b.e[0]=0;
  b.e[1]=0;
  b.e[2]=0;
  b.e[3]=0;
    
    
  for(n=0;n<1000;++n) {
    b.vect = b.vect + a.vect;

    /*
    b.e[0] = b.e[0] + a.e[0];
    b.e[1] = b.e[1] + a.e[1];
    b.e[2] = b.e[2] + a.e[2];
    b.e[3] = b.e[3] + a.e[3];
    */
    
  }

  //  printf("%f, %f, %f, %f\n", c.e[0], c.e[1], c.e[2], c.e[3]);
  return 0;
}

-- 
           Summary: Trying to use diouble precision SIMD vector causes:
                    internal compiler error: in extract_bit_field, at
                    expmed.c:1152
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ahu at ds9a dot nl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101


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

* [Bug optimization/15101] Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
  2004-04-23 15:09 [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152 ahu at ds9a dot nl
@ 2004-04-23 15:13 ` ahu at ds9a dot nl
  2004-04-23 15:39 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ahu at ds9a dot nl @ 2004-04-23 15:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101


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

* [Bug optimization/15101] Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
  2004-04-23 15:09 [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152 ahu at ds9a dot nl
  2004-04-23 15:13 ` [Bug optimization/15101] " ahu at ds9a dot nl
@ 2004-04-23 15:39 ` pinskia at gcc dot gnu dot org
  2004-04-23 18:01 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-23 15:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-23 15:09 -------
Confirmed on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-23 15:09:07
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101


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

* [Bug optimization/15101] Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
  2004-04-23 15:09 [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152 ahu at ds9a dot nl
  2004-04-23 15:13 ` [Bug optimization/15101] " ahu at ds9a dot nl
  2004-04-23 15:39 ` pinskia at gcc dot gnu dot org
@ 2004-04-23 18:01 ` bangerth at dealii dot org
  2004-07-23  3:43 ` [Bug middle-end/15101] " pinskia at gcc dot gnu dot org
  2004-10-22  0:27 ` [Bug middle-end/15101] Trying to use double " pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2004-04-23 18:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-23 16:07 -------
Confirmed with 3.4 as well: 
-------------- 
typedef int v4df __attribute__ ((mode(V4DF))); 
 
int main() 
{ 
  v4df a, b; 
  b = b + a; 
   
  return 0; 
} 
------------------- 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -Wall -ggdb -march=pentium3 -msse 
x.c -O3 
x.c: In function `main': 
x.c:6: internal compiler error: in extract_bit_field, at expmed.c:1152 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/gcc -Wall -ggdb -march=pentium3 -msse 
x.c -O3 
x.c:1: warning: specifying vector types with __attribute__ ((mode)) is 
deprecated 
x.c:1: warning: use __attribute__ ((vector_size)) instead 
x.c: In function `main': 
x.c:6: internal compiler error: in extract_bit_field, at expmed.c:1152 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101


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

* [Bug middle-end/15101] Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
  2004-04-23 15:09 [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152 ahu at ds9a dot nl
                   ` (2 preceding siblings ...)
  2004-04-23 18:01 ` bangerth at dealii dot org
@ 2004-07-23  3:43 ` pinskia at gcc dot gnu dot org
  2004-10-22  0:27 ` [Bug middle-end/15101] Trying to use double " pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-23  3:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-23 03:43 -------
The reduced testcase no longer fails as the code is removed before getting to RTL. Here is a better 
reduced testcase:
typedef double v4df __attribute__((vector_size(64)));

v4df main()
{
  v4df a, b;
  b = b + a;

  return b;
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |middle-end
   Last reconfirmed|2004-04-23 15:09:07         |2004-07-23 03:43:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101


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

* [Bug middle-end/15101] Trying to use double precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
  2004-04-23 15:09 [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152 ahu at ds9a dot nl
                   ` (3 preceding siblings ...)
  2004-07-23  3:43 ` [Bug middle-end/15101] " pinskia at gcc dot gnu dot org
@ 2004-10-22  0:27 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-22  0:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-22 00:27 -------
Fixed on the mainline:
: Search converges between 2004-03-01-trunk (#446) and 2004-04-01-trunk (#447).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101


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

end of thread, other threads:[~2004-10-22  0:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-23 15:09 [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152 ahu at ds9a dot nl
2004-04-23 15:13 ` [Bug optimization/15101] " ahu at ds9a dot nl
2004-04-23 15:39 ` pinskia at gcc dot gnu dot org
2004-04-23 18:01 ` bangerth at dealii dot org
2004-07-23  3:43 ` [Bug middle-end/15101] " pinskia at gcc dot gnu dot org
2004-10-22  0:27 ` [Bug middle-end/15101] Trying to use double " pinskia at gcc dot gnu dot 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).