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]

[Bug c++/51150] New: [C++11][4.6 Regression] ICE when result of -> initializes const variable of different type


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

             Bug #: 51150
           Summary: [C++11][4.6 Regression] ICE when result of ->
                    initializes const variable of different type
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jyasskin@gcc.gnu.org


Using gcc-4_6-branch@181398, the following program ICEs:


$ cat test.ii
class Clock {
  double Now();
};
template <class T> static void Foo(Clock* clock) {
  const int now = clock->Now();
}
$ g++ -std=c++0x -fsyntax-only test.ii
test.ii: In function âvoid Foo(Clock*)â:
test.ii:5:30: internal compiler error: unexpected expression âclock->â of kind
arrow_expr
Please submit a full bug report,


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