User account creation filtered due to spam.

Bug 35674 - openMP parallel for pragma with SIMD type as reduction variable crashes gcc
Summary: openMP parallel for pragma with SIMD type as reduction variable crashes gcc
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 22:07 UTC by Justin Finnerty
Modified: 2008-03-24 16:08 UTC (History)
1 user (show)

See Also:
Host:
Target: i586-suse-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-03-24 16:08:40


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Finnerty 2008-03-23 22:07:12 UTC
I tried to combine openMP with __m128d SIMD type as reduction variable in a parallel for loop - gcc crashed.  Here is a minimal code sample to reproduce the error, the command line and the error.

gcc -c -o test.o -march=pentium4 -fopenmp test.c
test.c: In function ‘test_fn’:
test.c:8: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.opensuse.org> for instructions.

-- %< -- test.c -- 
#include <emmintrin.h>

void test_fn ()
{
__m128d sum;
int k;
#pragma omp parallel for private (k) reduction (+:sum)
for (k = 0; k < 1; ++k)
  {
  }
}
-- %< --
Comment 1 Andrew Pinski 2008-03-24 00:19:55 UTC
This works for me on the trunk on powerpc-darwin (using double __attribute__((vector_size(16) ))   ).
Comment 2 Andrew Pinski 2008-03-24 16:08:39 UTC
Ok, on i686-linux-gnu, I can reproduce this failure.