public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36523]  New: OpenMP task construct fails to instantiate copy constructor
@ 2008-06-13 10:08 singler at gcc dot gnu dot org
  2008-06-13 13:30 ` [Bug c++/36523] " jakub at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: singler at gcc dot gnu dot org @ 2008-06-13 10:08 UTC (permalink / raw)
  To: gcc-bugs

The following test case fails with a linker error. It compiles okay with the
pragma omp task line removed.

template<typename T>
struct A
{
  A() { }
  A(const A&) { }
  void foo() { }
};

int main()
{
  A<int> a;
  #pragma omp task
    a.foo();
  return 0;
}


g++- -fopenmp -Wall task_instantiation.cpp
/tmp/ccQDTSgc.o: In function `main.omp_cpyfn.1':
task_instantiation.cpp:(.text+0x7e): undefined reference to `A<int>::A(A<int>
const&)'
collect2: ld returned 1 exit status

Workarounds:
-declare 'a' shared (mind data consistency)
-instantiate copy constructor explicitly


-- 
           Summary: OpenMP task construct fails to instantiate copy
                    constructor
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: singler at gcc dot gnu dot org


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


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

* [Bug c++/36523] OpenMP task construct fails to instantiate copy constructor
  2008-06-13 10:08 [Bug c++/36523] New: OpenMP task construct fails to instantiate copy constructor singler at gcc dot gnu dot org
@ 2008-06-13 13:30 ` jakub at gcc dot gnu dot org
  2008-06-20  2:19 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-13 13:30 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                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
           Keywords|                            |openmp
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-13 13:29:33
               date|                            |


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


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

* [Bug c++/36523] OpenMP task construct fails to instantiate copy constructor
  2008-06-13 10:08 [Bug c++/36523] New: OpenMP task construct fails to instantiate copy constructor singler at gcc dot gnu dot org
  2008-06-13 13:30 ` [Bug c++/36523] " jakub at gcc dot gnu dot org
@ 2008-06-20  2:19 ` jakub at gcc dot gnu dot org
  2008-06-23  6:48 ` jakub at gcc dot gnu dot org
  2008-12-28  0:53 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-20  2:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2008-06-20 02:18 -------
Subject: Bug 36523

Author: jakub
Date: Fri Jun 20 02:18:07 2008
New Revision: 136977

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136977
Log:
        PR c++/36523
        * cgraphunit.c (cgraph_process_new_functions): Don't clear
        node->needed and node->reachable.
        * cgraphbuild.c (record_reference): Handle OMP_PARALLEL and OMP_TASK.
        * omp-low.c (delete_omp_context): Call finalize_task_copyfn.
        (expand_task_call): Don't call expand_task_copyfn.
        (expand_task_copyfn): Renamed to...
        (finalize_task_copyfn): ... this.

        * testsuite/libgomp.c++/task-7.C: New function.

Added:
    trunk/libgomp/testsuite/libgomp.c++/task-7.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraphbuild.c
    trunk/gcc/cgraphunit.c
    trunk/gcc/omp-low.c
    trunk/libgomp/ChangeLog


-- 


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


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

* [Bug c++/36523] OpenMP task construct fails to instantiate copy constructor
  2008-06-13 10:08 [Bug c++/36523] New: OpenMP task construct fails to instantiate copy constructor singler at gcc dot gnu dot org
  2008-06-13 13:30 ` [Bug c++/36523] " jakub at gcc dot gnu dot org
  2008-06-20  2:19 ` jakub at gcc dot gnu dot org
@ 2008-06-23  6:48 ` jakub at gcc dot gnu dot org
  2008-12-28  0:53 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-23  6:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2008-06-23 06:47 -------
Fixed on the trunk.


-- 

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


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

* [Bug c++/36523] OpenMP task construct fails to instantiate copy constructor
  2008-06-13 10:08 [Bug c++/36523] New: OpenMP task construct fails to instantiate copy constructor singler at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-06-23  6:48 ` jakub at gcc dot gnu dot org
@ 2008-12-28  0:53 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-28  0:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

end of thread, other threads:[~2008-12-28  0:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-13 10:08 [Bug c++/36523] New: OpenMP task construct fails to instantiate copy constructor singler at gcc dot gnu dot org
2008-06-13 13:30 ` [Bug c++/36523] " jakub at gcc dot gnu dot org
2008-06-20  2:19 ` jakub at gcc dot gnu dot org
2008-06-23  6:48 ` jakub at gcc dot gnu dot org
2008-12-28  0:53 ` 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).