This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42701] [4.5 Regression] ICE on error recovery
- 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: 14 Jan 2010 10:14:23 -0000
- Subject: [Bug c++/42701] [4.5 Regression] ICE on error recovery
- References: <bug-42701-11764@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-01-14 10:14 -------
Reduced testcase from PR42725:
namespace Glib {
class ustring {
public:
typedef unsigned size_type;
ustring(const char* src, size_type n);
ustring(const char* src);
};
}
namespace Gdk {
class Color {
public:
explicit Color(const Glib::ustring& value);
};
}
namespace Gtk {
enum StateType { STATE_NORMAL };
class Widget {
public:
void modify_bg(StateType state, const Gdk::Color& color);
};
class Label {
public:
void set_text(const Glib::ustring &str);
};
}
typedef enum Result { eSuccess = 0 } Result;
class MainWindow {
void update_status(Result result);
Gtk::Widget status_frame;
Gtk::Label status_label;
};
void MainWindow::update_status(Result result) {
switch (result) {
status_frame.modify_bg(Gtk::STATE_NORMAL,Gdk::Color::Color("green"));
status_frame.modify_bg(Gtk::STATE_NORMAL,Gdk::Color::Color("red"));
status_label.set_text("Out of memory");
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42701