Vector Class Discussion

gcc vector class+std::list crash
Author:  Date: 2013-10-22 09:42
Hi Agner,
I started using vectorClass for an hobby project and I found a little problem with GCC 4.8.1 on windows with optimization turned on.

I created a structure "state" that has inside some Vec4i variables and a list containing states

std::list<state> stateInfo;

when i add the first data to stateInfo I got a crash if I use gcc 4.8.1 with optimization enabled ( setting no optimization solve the problem)

state s;

s.vector=0; //<-- Vec4i

stateInfo.push_back(s); <-- CRASH

if I replace the Vec4i with an int the problem is gone.
have you some idea of how to solve the problem? have you ever had such a problem?

best regards Marco

thread gcc vector class+std::list crash - Marco Belli - 2013-10-22
reply gcc vector class+std::list crash new - Agner - 2013-10-23
last replythread more on vectorclass and STL problems new - renato talucci - 2014-10-21
last reply more on vectorclass and STL problems new - Agner - 2014-10-21