This code works with the previous cygwin compiler that was based on gcc 3.3.3. Thank you for looking at this.
"gcc -v" gives: Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured) Thread model: posix gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) The output when compiling with "gcc -c t.cpp": t.cpp: In constructor `Point::Point(pointIterator, pointIterator) [with pointIterator = __gnu_cxx::__normal_iterator<Point*, std::vector<Point, std::allocator<Point> > >]': t.cpp:22: instantiated from `Point::Point(pointIterator, pointIterator) [with pointIterator = __gnu_cxx::__normal_iterator<Point*, std::vector<Point, std::allocator<Point> > >]' t.cpp:34: instantiated from here t.cpp:22: internal compiler error: in rest_of_handle_final, at toplev.c:2067 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Here is the source of the program (37 lines): #include <iostream> #include <vector> // This is from an include file in a library. If OTF_IMEX is instead // defined to be __declspec(dllexport), then it compiles, but that // should only be done in the compliation of the library, not where it // is included. # define OTF_IMEX __declspec(dllimport) class OTF_IMEX Point { float data_[3]; friend inline std::ostream& operator<<(std::ostream&, const Point&); public: Point(); Point(float x, float y, float z); template <class pointIterator> Point(pointIterator ptStart, pointIterator ptStop); }; template <class pointIterator> Point::Point(pointIterator ptStart, pointIterator ptStop) { // construct a point that is the average of the given points } // back to your normal program that included the above int main() { std::vector<Point> points; points.push_back(Point(0, 0, 0)); points.push_back(Point(1, 1, 1)); Point pt(points.begin(), points.end()); std::cout << "average point: " << pt << '\n'; return 0; } -- Summary: internal compiler error: in rest_of_handle_final, at toplev.c:2067 Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gregc at cgl dot ucsf dot edu CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-cygwin GCC host triplet: i686-pc-cygwin GCC target triplet: i686-pc-cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23589