https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78999
Bug ID: 78999
Summary: problem with gcc on cygwin??? cygwin 2.6.1 with gcc
5.4.0
Product: gcc
Version: 5.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bplummer at hotmail dot com
Target Milestone: ---
I can't get to the bottom of this. I'm thinking that there is an internal
problem with the compiler. Mismatch between 32 and 64 bit? Library problem?
Unfortunately, as this is beyond my pay grade, I've gone as far as I can go.
The following is the first thing I did after a complete reinstall of Cygwin
2.6.1. I encountered this as I was trying to configure and build gcc-6.2.0 but
note that the test that I display here has nothing to do with gcc-6.2.0. And
while I'm compiling for std=c++11, I don't think it has anything to do with
this.
Brian@MBPWin7-64 /tmp/gcc-6.2.0/build
$ uname -a
CYGWIN_NT-6.1 MBPWin7-64 2.6.1(0.305/5/3) 2016-12-16 11:55 x86_64 Cygwin
Brian@MBPWin7-64 /tmp/gcc-6.2.0/build
$ gcc --version
gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Brian@MBPWin7-64 /tmp/gcc-6.2.0/build
$ cat test.cpp
//Program to test the new C++11 lambda syntax and initalizer lists
#include <iostream>
#include <vector>
using namespace std;
int main()
{
// Test lambda
cout << [](int m, int n) { return m + n;} (2,4) << endl;
// Test initializer lists and range based for loop
vector<int]]
>
V({1,2,3});
cout << "V =" << endl;
for(auto e : V) {
cout << e << endl;
}
return 0;
}
Brian@MBPWin7-64 /tmp/gcc-6.2.0/build
$ gcc -std=c++11 test.cpp -o test
Cygwin runtime failure: /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/cc1plus.exe:
Invalid relocation. Offset 0xfffffffea2b0d031 at address 0x547c41cbb doesn't
fit into 32 bits