This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/9896: ICE on conversion of target-specific type with optimization enabled


>Number:         9896
>Category:       target
>Synopsis:       ICE on conversion of target-specific type with optimization enabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 01 05:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Michael Wittman
>Release:        gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>Organization:
>Environment:
stock Red Hat 8 athlon system
Linux texel.localdomain 2.4.18-24.8.0 #1 Fri Jan 31 07:28:55 EST 2003 i686 athlon i386 GNU/Linux
>Description:
When compiling the code below with optimization enabled, I am getting the following ICE.  This occurs at any optimization level, but does not occur if optimization is disabled.

g++ -mmmx -O -c test.cpp
test.cpp: In constructor `v4hi::v4hi(const v8qi&)':
test.cpp:30: Internal compiler error in extract_bit_field, at expmed.c:1147
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.



typedef int v8qi_t __attribute__ ((mode(V8QI)));
typedef int v4hi_t __attribute__ ((mode(V4HI)));

class v8qi;
class v4hi;

class v8qi
{
public:
  v8qi() { }
  v8qi( const v4hi_t &data ) { this->data = (v8qi_t)data; }
  
  operator v8qi_t() const  { return data; }

  v8qi_t data;
};


class v4hi
{
public:
  v4hi( const v8qi_t &data ) { this->data = (v4hi_t)data; }
  v4hi( const v8qi &other );

  v4hi_t data;
};


// gcc won't recognize "*this = (v8qi_t)other;" for some reason
v4hi::v4hi( const v8qi &other ) { *this = other.operator v8qi_t(); }

void bar()
{
  (v4hi)v8qi();
}
>How-To-Repeat:
Compile with the given command line.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]