public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/29965]  New: Objective-C exceptions vs OpenMP
@ 2006-11-23 22:57 pinskia at gcc dot gnu dot org
  2006-11-23 23:04 ` [Bug middle-end/29965] OpenMP vs always throw in a loop pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-23 22:57 UTC (permalink / raw)
  To: gcc-bugs

The following program causes an ICE with -fopenmp -fexceptions:
extern void bar (int);

void
foo (int n)
{
  int i;
#pragma omp parallel for schedule(dynamic)
  for (i = 0; i < n; i++)
    {
    bar (0);
      @throw 0;
    }
}


-- 
           Summary: Objective-C exceptions vs OpenMP
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
@ 2006-11-23 23:04 ` pinskia at gcc dot gnu dot org
  2006-11-26 19:16 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-23 23:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-11-23 23:04 -------
Actually you can reproduce the same ICE (with the same backtrace) with C++
code:
extern void bar (int);

void
foo (int n)
{
  int i;
#pragma omp parallel for schedule(dynamic)
  for (i = 0; i < n; i++)
    {
      throw 0;
    }
}


So this is not specific to Objective-C any more.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|objc                        |middle-end
            Summary|Objective-C exceptions vs   |OpenMP vs always throw in a
                   |OpenMP                      |loop


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
  2006-11-23 23:04 ` [Bug middle-end/29965] OpenMP vs always throw in a loop pinskia at gcc dot gnu dot org
@ 2006-11-26 19:16 ` jakub at gcc dot gnu dot org
  2006-11-29 20:21 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-11-26 19:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2006-11-26 19:16 -------
That's actually ICE on invalid, you can't throw out of a parallel region.
OpenMP 2.5, section 2.4 says:
"A throw executed inside a parallel region must cause execution to resume
within the same parallel region, and it must be caught by the same thread that
threw the exception."


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
  2006-11-23 23:04 ` [Bug middle-end/29965] OpenMP vs always throw in a loop pinskia at gcc dot gnu dot org
  2006-11-26 19:16 ` jakub at gcc dot gnu dot org
@ 2006-11-29 20:21 ` jakub at gcc dot gnu dot org
  2006-12-04 10:21 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-11-29 20:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2006-11-29 20:21 -------
This is similar to PR27328 which was only fixed for omp parallel (and even then
only when not inlined or inlined at most once).
Started fixing these omp region with NULL region->exit and/or region->cond
issues today, but still have some to finish tomorrow.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-29 20:21:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-11-29 20:21 ` jakub at gcc dot gnu dot org
@ 2006-12-04 10:21 ` jakub at gcc dot gnu dot org
  2006-12-04 10:23 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-12-04 10:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2006-12-04 10:21 -------
Subject: Bug 29965

Author: jakub
Date: Mon Dec  4 10:20:51 2006
New Revision: 119483

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119483
Log:
        PR middle-end/29965
        * omp-low.c (determine_parallel_type): Don't try to optimize combined
        parallels if region->exit or region->inner->exit is NULL.
        (expand_omp_parallel): Handle NULL region->exit even if cfg is already
        built.
        (expand_omp_for_generic): Handle NULL region->cond and region->exit.
        (expand_omp_for): Use expand_omp_for_generic if either region->cond
        or region->exit is NULL.
        (expand_omp_sections): Handle NULL region->cond or region->exit.
        (expand_omp_synch): 

        * gcc.dg/gomp/pr29965-1.c: New test.
        * gcc.dg/gomp/pr29965-2.c: New test.
        * gcc.dg/gomp/pr29965-3.c: New test.
        * gcc.dg/gomp/pr29965-4.c: New test.
        * gcc.dg/gomp/pr29965-5.c: New test.
        * gcc.dg/gomp/pr29965-6.c: New test.
        * g++.dg/gomp/pr29965-1.C: New test.
        * g++.dg/gomp/pr29965-2.C: New test.
        * g++.dg/gomp/pr29965-3.C: New test.
        * g++.dg/gomp/pr29965-4.C: New test.
        * g++.dg/gomp/pr29965-5.C: New test.
        * g++.dg/gomp/pr29965-6.C: New test.
        * g++.dg/gomp/pr29965-7.C: New test.
        * g++.dg/gomp/pr29965-8.C: New test.
        * g++.dg/gomp/pr29965-9.C: New test.
        * g++.dg/gomp/pr29965-10.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-1.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-10.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-2.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-3.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-4.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-5.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-6.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-7.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-8.C
    trunk/gcc/testsuite/g++.dg/gomp/pr29965-9.C
    trunk/gcc/testsuite/gcc.dg/gomp/pr29965-1.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr29965-2.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr29965-3.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr29965-4.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr29965-5.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr29965-6.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/omp-low.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-12-04 10:21 ` jakub at gcc dot gnu dot org
@ 2006-12-04 10:23 ` jakub at gcc dot gnu dot org
  2006-12-04 10:36 ` jakub at gcc dot gnu dot org
  2007-01-10 19:16 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-12-04 10:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2006-12-04 10:23 -------
Subject: Bug 29965

Author: jakub
Date: Mon Dec  4 10:23:06 2006
New Revision: 119484

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119484
Log:
        PR middle-end/29965
        * omp-low.c (determine_parallel_type): Don't try to optimize combined
        parallels if region->exit or region->inner->exit is NULL.
        (expand_omp_parallel): Handle NULL region->exit even if cfg is already
        built.
        (expand_omp_for_generic): Handle NULL region->cond and region->exit.
        (expand_omp_for): Use expand_omp_for_generic if either region->cond
        or region->exit is NULL.
        (expand_omp_sections): Handle NULL region->cond or region->exit.
        (expand_omp_synch): 

        * gcc.dg/gomp/pr29965-1.c: New test.
        * gcc.dg/gomp/pr29965-2.c: New test.
        * gcc.dg/gomp/pr29965-3.c: New test.
        * gcc.dg/gomp/pr29965-4.c: New test.
        * gcc.dg/gomp/pr29965-5.c: New test.
        * gcc.dg/gomp/pr29965-6.c: New test.
        * g++.dg/gomp/pr29965-1.C: New test.
        * g++.dg/gomp/pr29965-2.C: New test.
        * g++.dg/gomp/pr29965-3.C: New test.
        * g++.dg/gomp/pr29965-4.C: New test.
        * g++.dg/gomp/pr29965-5.C: New test.
        * g++.dg/gomp/pr29965-6.C: New test.
        * g++.dg/gomp/pr29965-7.C: New test.
        * g++.dg/gomp/pr29965-8.C: New test.
        * g++.dg/gomp/pr29965-9.C: New test.
        * g++.dg/gomp/pr29965-10.C: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-1.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-10.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-2.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-3.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-4.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-5.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-6.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-7.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-8.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr29965-9.C
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/gomp/pr29965-1.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/gomp/pr29965-2.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/gomp/pr29965-3.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/gomp/pr29965-4.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/gomp/pr29965-5.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/gomp/pr29965-6.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/omp-low.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-12-04 10:23 ` jakub at gcc dot gnu dot org
@ 2006-12-04 10:36 ` jakub at gcc dot gnu dot org
  2007-01-10 19:16 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-12-04 10:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2006-12-04 10:36 -------
Fixed in SVN.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/29965] OpenMP vs always throw in a loop
  2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-12-04 10:36 ` jakub at gcc dot gnu dot org
@ 2007-01-10 19:16 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 19:16 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29965


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-01-10 19:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-23 22:57 [Bug objc/29965] New: Objective-C exceptions vs OpenMP pinskia at gcc dot gnu dot org
2006-11-23 23:04 ` [Bug middle-end/29965] OpenMP vs always throw in a loop pinskia at gcc dot gnu dot org
2006-11-26 19:16 ` jakub at gcc dot gnu dot org
2006-11-29 20:21 ` jakub at gcc dot gnu dot org
2006-12-04 10:21 ` jakub at gcc dot gnu dot org
2006-12-04 10:23 ` jakub at gcc dot gnu dot org
2006-12-04 10:36 ` jakub at gcc dot gnu dot org
2007-01-10 19:16 ` pinskia 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).