This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34750] [4.1/4.2 Regression] ICE in fold_convert, at fold-const.c:1955
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2008 18:24:22 -0000
- Subject: [Bug c++/34750] [4.1/4.2 Regression] ICE in fold_convert, at fold-const.c:1955
- References: <bug-34750-12577@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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