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++/17345] New: internal compiler error: in optimize_mode_switching, at lcm.c:1225


Current CVS mainline G++ (3.5.0 20040906) ICE with error message:

test.cpp: In member function `int Class1::calc()':
test.cpp:29: internal compiler error: in optimize_mode_switching, at lcm.c:1225
Please submit a full bug report,

at testcase:

---8X----------------
#include <map>

class Class1 {
  int calc();
  int num; 
  static Class1* get();
};

int Class1::calc() {
  int res = 0;

  typedef std::map<unsigned, unsigned> MapU2U;
  MapU2U mapU2U;

  for(MapU2U::iterator it = mapU2U.begin(); it != mapU2U.end(); ++it) {
    double f = it->second / get()->num;
    res = std::max( (int) f, res);
  }

  return res;
}
---X8----------------

Commandline: g++ test.cpp

-- 
           Summary: internal compiler error: in optimize_mode_switching, at
                    lcm.c:1225
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wanderer at rsu dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd5.1
  GCC host triplet: i386-unknown-freebsd5.1
GCC target triplet: i386-unknown-freebsd5.1


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


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