public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34750]  New: ICE in fold_convert, at fold-const.c:1955
@ 2008-01-12 16:53 timj at gtk dot org
  2008-01-12 17:05 ` [Bug c++/34750] " timj at gtk dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: timj at gtk dot org @ 2008-01-12 16:53 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

compiling gccfolderr.cc like this:
  g++-4.1 -g -Wall -Wdeprecated -Wno-cast-qual -pipe -O2 -ftracer \
    -finline-functions -fno-keep-static-consts gccfolderr.cc
yields:
  gccfolderr.cc: In function ‘void<unnamed>::test_array()’:
  gccfolderr.cc:34571: internal compiler error: in fold_convert, at \
    fold-const.c:1955

compiling it without options still results in an ICE:
  g++-4.1 gccfolderr.cc
albeit a different one:
  gccfolderr.cc:34571: internal compiler error: in cp_expr_size, at \
    cp/cp-objcp-common.c:101

gcc version details (etch x86):
$ g++-4.1 --version
g++-4.1 (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

compressed preprocessor file follows.


-- 
           Summary: ICE in fold_convert, at fold-const.c:1955
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: timj at gtk dot org


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


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

* [Bug c++/34750] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
@ 2008-01-12 17:05 ` timj at gtk dot org
  2008-01-12 17:57 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: timj at gtk dot org @ 2008-01-12 17:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from timj at gtk dot org  2008-01-12 15:34 -------
Created an attachment (id=14929)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14929&action=view)
compressed C++ preprocessor output

the preprocessed code was spewed out by gcc in the middle of development, it is
not meant to do anything sensible. line directives have been stripped and it
was compressed with bzip2 to avoid inflating bugzilla with 3MB preprocessor
blobs.


-- 


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


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

* [Bug c++/34750] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
  2008-01-12 17:05 ` [Bug c++/34750] " timj at gtk dot org
@ 2008-01-12 17:57 ` rguenth at gcc dot gnu dot org
  2008-01-12 18:20 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-12 17:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-12 17:47 -------
Can you please retain line directives so we can bring this up to current
development versions?  Thanks.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/34750] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
  2008-01-12 17:05 ` [Bug c++/34750] " timj at gtk dot org
  2008-01-12 17:57 ` rguenth at gcc dot gnu dot org
@ 2008-01-12 18:20 ` rguenth at gcc dot gnu dot org
  2008-01-12 18:44 ` [Bug c++/34750] [4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-12 18:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-01-12 18:09 -------
Note this may be invalid code, g++ 3.4 reports:

gccfolderr.cc: In constructor `Rapicorn0752::Model::AutoValue::AutoValue(const
Rapicorn0752::Model::Array&)':
gccfolderr.cc:34571: error: invalid use of undefined type `struct
Rapicorn0752::Model::Array'
gccfolderr.cc:34450: error: forward declaration of `struct
Rapicorn0752::Model::Array'
gccfolderr.cc:34571: error:   initializing argument 2 of
`Rapicorn0752::Model::AnyValue::AnyValue(Rapicorn0752::Model::Type::Storage, V)
[with V = Rapicorn0752::Model::Array]'


-- 


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


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

* [Bug c++/34750] [4.1/4.2 Regression] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
                   ` (2 preceding siblings ...)
  2008-01-12 18:20 ` rguenth at gcc dot gnu dot org
@ 2008-01-12 18:44 ` rguenth at gcc dot gnu dot org
  2008-01-12 19:44 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-12 18:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-01-12 18:24 -------
Reduced testcase:

namespace std {
  template<typename _CharT>
  class basic_string {
  public:
    basic_string(const _CharT* __s);
  };
  typedef basic_string<char> string;
}
typedef signed long long int int64;
typedef std::string String;
class Array;
class Type {
public:
  enum Storage { NUM = 'n', FLOAT = 'f', STRING = 's',
                 OBJECT = 'O', STRING_VECTOR = 'v', ARRAY = 'A'  };
};
class BaseValue {
protected:
  explicit BaseValue (Type::Storage value_type);
};
class AnyValue : public BaseValue {
public:
  template<typename V>
  explicit AnyValue (Type::Storage strg, V value)
    : BaseValue (strg) {       }
};
class AutoValue : public AnyValue {
public:
  AutoValue (const String &string)
    : AnyValue (Type::STRING, string) {       }
  AutoValue (const Array &array)
    : AnyValue (Type::ARRAY, array) {       }
};
class Array {
public:
  Array (const Array &other);
  explicit Array ();
  Array& operator= (const Array &other);
  void push_tail (const AutoValue &value) {}
};
void test_array ()
{
  Array a;
  const char *x[][8] = {};
  for (int64 i = 0; i < sizeof (x) / sizeof (x[0]); i++) 
    {   
      Array b; 
      for (int64 j = 0; j < sizeof (x[0]) / sizeof (x[0][0]); j++)
        b.push_tail (String (x[i][j]));     
      a.push_tail (b);   
    }
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.0.4 4.1.3 4.2.3
      Known to work|                            |3.4.6 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-12 18:24:22
               date|                            |
            Summary|ICE in fold_convert, at     |[4.1/4.2 Regression] ICE in
                   |fold-const.c:1955           |fold_convert, at fold-
                   |                            |const.c:1955
   Target Milestone|---                         |4.2.3


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


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

* [Bug c++/34750] [4.1/4.2 Regression] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
                   ` (3 preceding siblings ...)
  2008-01-12 18:44 ` [Bug c++/34750] [4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
@ 2008-01-12 19:44 ` reichelt at gcc dot gnu dot org
  2008-02-01 17:06 ` jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-01-12 19:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2008-01-12 19:23 -------
Even further reduced testcase:

=================================
struct A
{
  template<typename T> A(T);
};

class C;

struct B : A
{
  B(const C& c) : A(c) {}
};

struct C
{
  C(const C&);
  C();
  C& operator= (const C&);
};

B b = C();
=================================

bug.cc: In constructor 'B::B(const C&)':
bug.cc:10: internal compiler error: in cp_expr_size, at
cp/cp-objcp-common.c:100
Please submit a full bug report, [etc.]

This is really invalid code (C is used before it is defined).

The bug was fixed on mainline between 2007-10-13 and 2007-11-13.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-invalid-code,
                   |                            |monitored
      Known to fail|4.0.4 4.1.3 4.2.3           |4.0.4 4.1.2 4.1.3 4.2.0
                   |                            |4.2.1 4.2.2 4.2.3
      Known to work|3.4.6 4.3.0                 |3.4.6 4.0.0 4.0.3 4.1.0
                   |                            |4.1.1 4.3.0


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


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

* [Bug c++/34750] [4.1/4.2 Regression] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
                   ` (4 preceding siblings ...)
  2008-01-12 19:44 ` reichelt at gcc dot gnu dot org
@ 2008-02-01 17:06 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2008-02-01 16:55 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug c++/34750] [4.1/4.2 Regression] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
                   ` (5 preceding siblings ...)
  2008-02-01 17:06 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
  2008-07-04 22:55 ` [Bug c++/34750] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-31 14:59 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2008-05-19 20:24 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c++/34750] [4.2 Regression] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
                   ` (6 preceding siblings ...)
  2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
@ 2008-07-04 22:55 ` jsm28 at gcc dot gnu dot org
  2009-03-31 14:59 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2008-07-04 22:54 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 Regression] ICE in |[4.2 Regression] ICE in
                   |fold_convert, at fold-      |fold_convert, at fold-
                   |const.c:1955                |const.c:1955


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


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

* [Bug c++/34750] [4.2 Regression] ICE in fold_convert, at fold-const.c:1955
  2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
                   ` (7 preceding siblings ...)
  2008-07-04 22:55 ` [Bug c++/34750] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-31 14:59 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 14:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jsm28 at gcc dot gnu dot org  2009-03-31 14:58 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.0.4 4.1.2 4.1.3 4.2.0     |4.0.4 4.1.2 4.1.3 4.2.0
                   |4.2.1 4.2.2 4.2.3           |4.2.1 4.2.2 4.2.3 4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-31 14:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-12 16:53 [Bug c++/34750] New: ICE in fold_convert, at fold-const.c:1955 timj at gtk dot org
2008-01-12 17:05 ` [Bug c++/34750] " timj at gtk dot org
2008-01-12 17:57 ` rguenth at gcc dot gnu dot org
2008-01-12 18:20 ` rguenth at gcc dot gnu dot org
2008-01-12 18:44 ` [Bug c++/34750] [4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
2008-01-12 19:44 ` reichelt at gcc dot gnu dot org
2008-02-01 17:06 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
2008-07-04 22:55 ` [Bug c++/34750] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-31 14:59 ` jsm28 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).