public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42853] New: omp private vector
@ 2010-01-24 4:03 annacegu at yahoo dot com dot au
2010-01-24 13:18 ` [Bug c++/42853] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: annacegu at yahoo dot com dot au @ 2010-01-24 4:03 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
I try to compile the following code:
#include <omp.h>
#include <vector>
using std::vector;
int main()
{
vector<int> kdPoints;
vector<int> results;
vector<int>::iterator iter;
vector<int> histogram;
for (long long i = 0; i < 1000000; i++) kdPoints.push_back(i);
histogram.push_back(0);
#pragma omp parallel for private(results)
for (long long i = 0; i < kdPoints.size(); i++) {
#pragma omp critical
{histogram[results.size()]++;}
results.clear();
}
}
using g++-4.2 *.cpp -fopenmp
I get the following message:
bug_omp.cpp: In function int main():
bug_omp.cpp:0: internal compiler error: in lower_stmt, at gimple-low.c:282
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: omp private vector
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: annacegu at yahoo dot com dot au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42853
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/42853] omp private vector
2010-01-24 4:03 [Bug c++/42853] New: omp private vector annacegu at yahoo dot com dot au
@ 2010-01-24 13:18 ` rguenth at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-24 13:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-01-24 13:16 -------
Works for me with GCC 4.3.4 and 4.4.2. GCC 4.2 is no longer maintained.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42853
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-24 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-24 4:03 [Bug c++/42853] New: omp private vector annacegu at yahoo dot com dot au
2010-01-24 13:18 ` [Bug c++/42853] " rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).