Bugs item #1922710, was opened at 2008-03-22 00:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1922710&group_id=2435
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MinGW
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan Manuch (jano73)
Assigned to: Nobody/Anonymous (nobody)
Summary: non-constant static array + STL = crash
Initial Comment:
The following program will compile but crash:
#include <iostream>
#include <vector>
using namespace std;
struct X
{
vector<int> u;
};
void f(int n)
{
X a[n];
n=2*n;
cout <<"f() done"<<endl;
}
int main()
{
f(10);
cout <<"after call to f()"<<endl;
}
It will print "f() done" and then crashes before printing "after call to f()". Removing any line seems to avoid error.
I am using
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
installed by cygwin on XP Home.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1922710&group_id=2435
|