Bug 48591 - OpenMP ICE with atomics on __float128 in 32-bit only i686 cc1
Summary: OpenMP ICE with atomics on __float128 in 32-bit only i686 cc1
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code, openmp
Depends on:
Blocks:
 
Reported: 2011-04-13 12:44 UTC by Jakub Jelinek
Modified: 2011-04-13 15:59 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
gcc46-pr48591.patch (791 bytes, patch)
2011-04-13 13:12 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2011-04-13 12:44:13 UTC
extern void abort (void);

int
main ()
{
  __float128 f = 0.0;
  int i;
  #pragma omp parallel for reduction(+:f)
  for (i = 0; i < 128; i++)
    f++;
  if (f != 128.0Q)
    abort ();
  return 0;
}

ICEs with -fopenmp in 32-bit i686-linux cc1 (while works fine with x86_64-linux cc1 with -fopenmp -m32).
Comment 1 Jakub Jelinek 2011-04-13 13:12:19 UTC
Created attachment 23973 [details]
gcc46-pr48591.patch

Untested fix.
Comment 2 Jakub Jelinek 2011-04-13 15:50:12 UTC
Author: jakub
Date: Wed Apr 13 15:50:02 2011
New Revision: 172379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172379
Log:
	PR middle-end/48591
	* omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is
	NULL.
	(expand_omp_atomic_pipeline): Return false if cmpxchg is NULL.

	* gcc.dg/gomp/pr48591.c: New test.

	* testsuite/libgomp.c/pr48591.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/gomp/pr48591.c
    trunk/libgomp/testsuite/libgomp.c/pr48591.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/omp-low.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgomp/ChangeLog
Comment 3 Jakub Jelinek 2011-04-13 15:52:22 UTC
Author: jakub
Date: Wed Apr 13 15:52:17 2011
New Revision: 172381

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172381
Log:
	PR middle-end/48591
	* omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is
	NULL.
	(expand_omp_atomic_pipeline): Return false if cmpxchg is NULL.

	* gcc.dg/gomp/pr48591.c: New test.

	* testsuite/libgomp.c/pr48591.c: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/gomp/pr48591.c
    branches/gcc-4_6-branch/libgomp/testsuite/libgomp.c/pr48591.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/omp-low.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/libgomp/ChangeLog
Comment 4 Jakub Jelinek 2011-04-13 15:59:18 UTC
Fixed for 4.6+.