public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31598]  New: g++ does not accept some OpenMP code
@ 2007-04-17  8:20 theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-17  8:21 ` [Bug c++/31598] " theodore dot papadopoulo at sophia dot inria dot fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2007-04-17  8:20 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

This is with gcc version 4.3.0 20070416 (experimental).
The attached program when compiled with g++ and the flags -fopenmp gives the
following diagnostic and aborts compilation:

-> /usr/local/gcc-4.3/bin/g++ -fopenmp BugOMP.C
BugOMP.C: In constructor ‘R<M>::R()’:
BugOMP.C:18: error: invalid use of incomplete type ‘struct R<M>::R()::B’
BugOMP.C:9: error: declaration of ‘struct R<M>::R()::B’

But I do not see why R<M>::B would be an incomplete type in this program (some
bad
interaction with the template system ?).


-- 
           Summary: g++ does not accept some OpenMP code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: theodore dot papadopoulo at sophia dot inria dot fr
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
@ 2007-04-17  8:21 ` theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-23 15:46 ` theodore dot papadopoulo at sophia dot inria dot fr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2007-04-17  8:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from theodore dot papadopoulo at sophia dot inria dot fr  2007-04-17 09:21 -------
Created an attachment (id=13378)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13378&action=view)
The source code showing the potential bug....


-- 


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-17  8:21 ` [Bug c++/31598] " theodore dot papadopoulo at sophia dot inria dot fr
@ 2007-04-23 15:46 ` theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-23 16:01 ` theodore dot papadopoulo at sophia dot inria dot fr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2007-04-23 15:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from theodore dot papadopoulo at sophia dot inria dot fr  2007-04-23 16:46 -------
(From update of attachment 13378)
Slightly simplified the testcase


-- 


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-17  8:21 ` [Bug c++/31598] " theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-23 15:46 ` theodore dot papadopoulo at sophia dot inria dot fr
@ 2007-04-23 16:01 ` theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-24 10:41 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2007-04-23 16:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from theodore dot papadopoulo at sophia dot inria dot fr  2007-04-23 17:01 -------
Sorry to have added you without asking Jakub, but it looks like you are one of
the person that deals with OpenMP.... and this bug seems to have been unnoticed
up to now...

It seems that this problem is related to the template instanciation mecanism
(as far as I can tell). 

The trouble is that finish_omp_clauses ensures that the variable b is complete
by calling require_complete_type but since we are in template instanciation
mode, this function returns immediately without doing anything. Further in
finish_omp_clauses (semantics.c:3655), assuming that the type is complete the
code tries to build a call to a (copy?) constructor, build_call calls
complete_type_or_else which calls complete_type which calls
instantiate_class_template which returns immediately because TYPE_BEING_DEFINED
is true.... so complete_type_or_else complains.

Is there a way to defer the completeness check to after the type has been
instantiated ??


-- 

theodore dot papadopoulo at sophia dot inria dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com
            Summary|g++ does not accept some    |g++ does not accept some
                   |OpenMP code                 |OpenMP code


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
                   ` (2 preceding siblings ...)
  2007-04-23 16:01 ` theodore dot papadopoulo at sophia dot inria dot fr
@ 2007-04-24 10:41 ` jakub at gcc dot gnu dot org
  2007-04-26  6:33 ` theodore dot papadopoulo at sophia dot inria dot fr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-04-24 10:41 UTC (permalink / raw)
  To: gcc-bugs



-- 

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                     |
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2007-
                   |                            |04/msg01572.html
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-04-24 11:41:44
               date|                            |


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
                   ` (3 preceding siblings ...)
  2007-04-24 10:41 ` jakub at gcc dot gnu dot org
@ 2007-04-26  6:33 ` theodore dot papadopoulo at sophia dot inria dot fr
  2007-04-26  7:32 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2007-04-26  6:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from theodore dot papadopoulo at sophia dot inria dot fr  2007-04-26 07:32 -------
The patch at posted by Jakub
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01572.html 
seems to resolve this bug. Thanks.


-- 


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
                   ` (4 preceding siblings ...)
  2007-04-26  6:33 ` theodore dot papadopoulo at sophia dot inria dot fr
@ 2007-04-26  7:32 ` jakub at gcc dot gnu dot org
  2007-04-26  7:39 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-04-26  7:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2007-04-26 08:32 -------
Subject: Bug 31598

Author: jakub
Date: Thu Apr 26 08:32:27 2007
New Revision: 124178

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124178
Log:
        PR c++/31598
        * tree-inline.c (copy_body_r): Don't touch TREE_TYPE of OMP_CLAUSE.

        * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
        for type dependent OMP_CLAUSE_DECLs.

        * g++.dg/gomp/pr31598.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/gomp/pr31598.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-inline.c


-- 


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
                   ` (5 preceding siblings ...)
  2007-04-26  7:32 ` jakub at gcc dot gnu dot org
@ 2007-04-26  7:39 ` jakub at gcc dot gnu dot org
  2007-04-26  7:46 ` jakub at gcc dot gnu dot org
  2007-04-27 23:47 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-04-26  7:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2007-04-26 08:39 -------
Subject: Bug 31598

Author: jakub
Date: Thu Apr 26 08:39:25 2007
New Revision: 124180

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124180
Log:
        PR c++/31598
        * tree-inline.c (copy_body_r): Don't touch TREE_TYPE of OMP_CLAUSE.

        * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
        for type dependent OMP_CLAUSE_DECLs.

        * g++.dg/gomp/pr31598.C: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/gomp/pr31598.C
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/semantics.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/tree-inline.c


-- 


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


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
                   ` (6 preceding siblings ...)
  2007-04-26  7:39 ` jakub at gcc dot gnu dot org
@ 2007-04-26  7:46 ` jakub at gcc dot gnu dot org
  2007-04-27 23:47 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-04-26  7:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2007-04-26 08:46 -------
Fixed (4.3/4.2/4.1-rh).


-- 

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=31598


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

* [Bug c++/31598] g++ does not accept some OpenMP code
  2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
                   ` (7 preceding siblings ...)
  2007-04-26  7:46 ` jakub at gcc dot gnu dot org
@ 2007-04-27 23:47 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-27 23:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2007-04-28 00:46 -------
*** Bug 31708 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mstaley at lanl dot gov


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


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

end of thread, other threads:[~2007-04-27 23:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-17  8:20 [Bug c++/31598] New: g++ does not accept some OpenMP code theodore dot papadopoulo at sophia dot inria dot fr
2007-04-17  8:21 ` [Bug c++/31598] " theodore dot papadopoulo at sophia dot inria dot fr
2007-04-23 15:46 ` theodore dot papadopoulo at sophia dot inria dot fr
2007-04-23 16:01 ` theodore dot papadopoulo at sophia dot inria dot fr
2007-04-24 10:41 ` jakub at gcc dot gnu dot org
2007-04-26  6:33 ` theodore dot papadopoulo at sophia dot inria dot fr
2007-04-26  7:32 ` jakub at gcc dot gnu dot org
2007-04-26  7:39 ` jakub at gcc dot gnu dot org
2007-04-26  7:46 ` jakub at gcc dot gnu dot org
2007-04-27 23:47 ` 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).