Bug 31674 - [4.3 Regression] internal consistency failure on ia64 with -O
Summary: [4.3 Regression] internal consistency failure on ia64 with -O
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.0
: P1 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-04-23 21:37 UTC by Martin Michlmayr
Modified: 2007-06-30 21:24 UTC (History)
4 users (show)

See Also:
Host:
Target: ia64-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase (703 bytes, text/plain)
2007-04-23 21:40 UTC, Martin Michlmayr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Michlmayr 2007-04-23 21:37:22 UTC
I get an internal consistency failure on ia64 with current gcc 4.3.  This
was introduced between 20070326 and 20070422.  It doesn't happen on x86_64.

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/g++ -c kdeedu-libextdate_la.all_cpp.cc
tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/g++ -c -O kdeedu-libextdate_la.all_cpp.cc
kdeedu-libextdate_la.all_cpp.cc: In member function 'void ExtDateTimeEditor::paintEvent(QPaintEvent*)':
kdeedu-libextdate_la.all_cpp.cc:104: internal compiler error: internal consistency failure
Please submit a full bug report,
Comment 1 Martin Michlmayr 2007-04-23 21:40:16 UTC
Created attachment 13432 [details]
testcase
Comment 2 Martin Michlmayr 2007-04-23 22:54:30 UTC
Slightly more reduced:

class QString
{
public:QString ();
  QString & operator+= (const QString & str);
};
class Qt
{
};
template < class T > class QValueListIterator
{
};
template < class T > class QValueList
{
public:typedef QValueListIterator < T > iterator;
  const T & operator[] (long unsigned int i) const
  {
  }
};
class QNumberSection
{
public: QNumberSection (bool separat):
  sep (separat)
  {
  }
  bool separator ()
  {
    return sep;
  }
private:
  int act:7;
  bool sep:1;
};
class ExtDateTimeEditorPrivate
{
public:
  QString separator ()
  {
  }
  QNumberSection section (int idx)
  {
    return sections[idx];
  }
private:
  QValueList < QNumberSection > sections;
};
void
ExtDateTimeEditor()
{
  ExtDateTimeEditorPrivate *d;
  QString txt;
  for (unsigned int i = 0; i < 10; ++i)
    {
          if (d->section (i).separator ())
            txt += d->separator ();
    }
}
Comment 3 Martin Michlmayr 2007-04-26 11:46:08 UTC
Janis, can you please do a regression hunt on this?
Comment 4 Martin Michlmayr 2007-04-26 12:18:10 UTC
It appears to be related to bitfields.
Comment 5 Martin Michlmayr 2007-04-26 12:44:32 UTC
Here's a better, C based testcase:

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O anthy-wordlist.c
anthy-wordlist.c: In function 'anthy_make_word_list_all':
anthy-wordlist.c:33: internal compiler error: internal consistency failure
Please submit a full bug report, [...]
tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c anthy-wordlist.c
tbm@coconut0:~$

Testcase:

struct wtype
{
  unsigned int pos:5;
  unsigned int cos:4;
};
typedef struct wtype wtype_t;
struct word_list
{
  wtype_t wt;
};
extern wtype_t anthy_wtype_num_noun;
static void
make_pre_words (wtype_t x)
{
  wtype_t core_wt = x;
  anthy_wtype_include (anthy_wtype_num_noun, core_wt);
}
static void
make_word_list (int len)
{
  struct word_list tmpl;
  if (len == 1)
  {
      make_pre_words (tmpl.wt);
      make_suc_words (&tmpl);
  }
}
anthy_make_word_list_all ()
{
  int i;
  for (i = 0; i < 3; i++)
      make_word_list (i);
}
Comment 6 Janis Johnson 2007-04-26 18:26:09 UTC
A regression hunt on powerpc-linux with an ia64-linux cross compiler using the C test case from comment #5 identified the following patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=123524

    r123524 | aoliva | 2007-04-05 18:50:34 +0000 (Thu, 05 Apr 2007)
Comment 7 Martin Michlmayr 2007-05-04 13:17:33 UTC
Alexandre, can you investigate this issue?
Comment 8 Alexandre Oliva 2007-06-30 21:24:38 UTC
Sorry about the delay.  The patch that introduced this problem was reverted, and the revised version thereof, still awaiting review, does not trigger the problem any more.