Created attachment 39041 [details] the ii file This is my first bug report so be patient! g++ version is 6.1.1 20160707 [gcc-6-branch revision 238088] Full compilation flag are those https://gist.github.com/RoyBellingan/be151f3d22e7e0a50143d5dde622baba System type is uname --all Linux linux-gzgr 4.6.2-1-default #1 SMP PREEMPT Fri Jun 10 08:12:44 UTC 2016 (2a68ef0) x86_64 x86_64 x86_64 GNU/Linux The invocation line is g++-6 -save-temps -O2 campaigns/1350_tmp.cpp -std=c++11 -g -o campaigns/1350_3.so -shared -fPIC -Wall -Wconversion -Wsign-compare -pedantic-errors -I data/ Output given is https://gist.github.com/RoyBellingan/7c09b6bf8908f62b9052575bf14cf43d just some warning of non used variable (this code is create dynamically and loaded via dlopen) The .ii file is attached In short the at line 37937 of the ii file while (infile >> a){ fails because a is set to 0 WHEN the compiler is invoked with O2 (and also with O1) If I use O0 a is assigned the correct value ... For now a "fix" is to force swap the first line in a std:string (the two empty line at 37935 & 37936 unsigned long long a; std::ifstream infile("campaigns/1350_ids"); std::string cry; infile >> cry; while (infile >> a){ ids.insert(std::pair<unsigned long long,bool>(a,1)); } The 1350_ids file contains a list of id to check some rows are here https://gist.github.com/RoyBellingan/8dcde8d63001dfcd438ccf9921f60627 Hope is enought!
Please try to reduce the issue as much as possible. 37978 lines is much too large. A library is unusable for testing. Please provide a standalone testcase (with "int main()", that can be run directly.). Also try to compile and run with -fsanitize=undefined and see if anything pops up.
No feedback, no suitable testcase. Closing.
No wait I was quite busy -.- Ok to keep close for now, I will try to provide better info soon.
(In reply to Roy Bellingan from comment #3) > No wait I was quite busy -.- > Ok to keep close for now, I will try to provide better info soon. Putting in WAITING until then
(In reply to Eric Gallager from comment #4) > (In reply to Roy Bellingan from comment #3) > > No wait I was quite busy -.- > > Ok to keep close for now, I will try to provide better info soon. > > Putting in WAITING until then ...and closing again, since there's still no better info.