public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66053] New: openmp target data mappings containing this pointers
@ 2015-05-07 16:36 cesar at gcc dot gnu.org
  2015-06-10 11:37 ` [Bug c++/66053] " jsm28 at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cesar at gcc dot gnu.org @ 2015-05-07 16:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66053

            Bug ID: 66053
           Summary: openmp target data mappings containing this pointers
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: openacc, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cesar at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, tschwinge at gcc dot gnu.org
  Target Milestone: ---

Created attachment 35486
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35486&action=edit
omp target data map test

I know that the openmp spec states that incomplete types are prohibited from
being used in target data maps. However, what about this pointers? E.g. 

#pragma omp target data map (tofrom:this[0:1])

In this case, the entire object is getting transferred to the device. Should
this be ok? Currently gcc emits an "expected unqualified-id before ‘this’"
error message. Maybe cp_parser_omp_var_list_no_open needs to be made aware of
this pointers?

I've seen some examples of openacc programs using this pointers, but the
openacc 2.0a spec is unclear on c++ in general. So, if this pointers aren't
supported in openmp, I'm not planning on supporting it in openacc until the
spec explicitly demands it.
>From gcc-bugs-return-485767-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 07 16:40:45 2015
Return-Path: <gcc-bugs-return-485767-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32802 invoked by alias); 7 May 2015 16:40:45 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 32700 invoked by uid 48); 7 May 2015 16:40:41 -0000
From: "aldot at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug jit/66054] New: bootstrap comparison failure with --enable-host-shared
Date: Thu, 07 May 2015 16:40:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: jit
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords: build
X-Bugzilla-Severity: minor
X-Bugzilla-Who: aldot at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone
Message-ID: <bug-66054-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00607.txt.bz2
Content-length: 2037

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf054

            Bug ID: 66054
           Summary: bootstrap comparison failure with --enable-host-shared
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: minor
          Priority: P3
         Component: jit
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aldot at gcc dot gnu.org
                CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Bootstrapping with --enable-host-shared fails stage2/3 comparison for all but
crt files.

Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
Bootstrap comparison failure!
gcc/builtins.o differs
[snip gcc/{,*/}*.o libbacktrace/{,.libs/}*.o libcpp/*.o libdecnumber/*.o
libiberty/*.o lto-plugin/.libs/*.o zlib/*.o]
make[2]: *** [compare] Error 1
make[2]: Leaving directory `..../obj.x86_64/gcc-6.0.orig'
make[1]: *** [stage3-bubble] Error 2

for me when i

../../src/gcc-6.0.orig/configure \
  -v \
  --enable-languages=c,lto,fortran,c++,go,objc,obj-c++,jit \
  LD="ld" \
  CFLAGS="-g -O2" \
  CXXFLAGS="-g -O2" \
  BOOT_CFLAGS="-g -O2" \
  BOOT_CXXFLAGS="-g -O2" \
  CFLAGS_FOR_TARGET="-g -O2" \
  CXXFLAGS_FOR_TARGET="-g -O2" \
  --prefix=/opt/x86_64/gcc-6.0.orig// \
  --enable-shared \
  --without-system-zlib \
  --enable-nls \
  --without-included-gettext \
  --enable-threads=posix \
  --enable-__cxa_atexit \
  --enable-libstdcxx-allocator=mt \
  --enable-clocale=gnu \
  --enable-libstdcxx-debug \
  --enable-mpfr \
  --disable-werror \
  --enable-debug \
  --with-isl=/opt/x86_64/isl \
  -C \
  --disable-intermodule \
  --enable-multilib \
  --disable-libstdcxx-pch \
  --enable-bootstrap \
  --enable-host-shared \
  --enable-checking=yes \
  --with-cpu=native \
  --with-tune=native \
  --enable-plugin

ISTM that nowadays at least some libraries already have pic/*.o (libiberty
comes to mind)


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

* [Bug c++/66053] openmp target data mappings containing this pointers
  2015-05-07 16:36 [Bug c++/66053] New: openmp target data mappings containing this pointers cesar at gcc dot gnu.org
@ 2015-06-10 11:37 ` jsm28 at gcc dot gnu.org
  2015-08-24  9:35 ` jakub at gcc dot gnu.org
  2024-04-04 20:54 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-06-10 11:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66053

--- Comment #1 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Author: jsm28
Date: Wed Jun 10 11:37:20 2015
New Revision: 224325

URL: https://gcc.gnu.org/viewcvs?rev=224325&root=gcc&view=rev
Log:
[gomp4] Support C++ "this" in OpenACC directives.

This patch, for gomp-4_0-branch, adds support for C++ "this" in
OpenACC directives.  (This patch does not do anything to handle OpenMP
differently from OpenACC; that - bug 66053 - will need to be resolved
for mainline, either deciding these cases should be accepted for
OpenMP or making the parsing only accept them in OpenACC directives
and not OpenMP ones.)

Apart from parsing, it's necessary to prevent the "cannot take the
address of 'this', which is an rvalue expression" error from appearing
when "this" is used in such contexts.  This patch duly adds a new
argument to cxx_mark_addressable (default false so callers don't all
need to change) to allow disabling that error, passing that argument
in all calls that seem relevant to OpenACC directives.

Tested for x86_64-none-linux-gnu and applied to gomp-4_0-branch.

gcc/cp:
2015-06-10  Joseph Myers  <joseph@codesourcery.com>

        * parser.c (cp_parser_omp_var_list_no_open): Handle RID_THIS.
        * typeck.c (cxx_mark_addressable): Add argument ALLOW_THIS.
        * cp-tree.h (cxx_mark_addressable): Update prototype.
        * semantics.c (handle_omp_array_sections)
        (finish_omp_reduction_clause, finish_omp_clauses): Pass ALLOW_THIS
        to cxx_mark_addressable.

libgomp:
2015-06-10  Cesar Philippidis  <cesar@codesourcery.com>

        * testsuite/libgomp.oacc-c++/this.C: New test.

Added:
    branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-c++/this.C
Modified:
    branches/gomp-4_0-branch/gcc/cp/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/cp/cp-tree.h
    branches/gomp-4_0-branch/gcc/cp/parser.c
    branches/gomp-4_0-branch/gcc/cp/semantics.c
    branches/gomp-4_0-branch/gcc/cp/typeck.c
    branches/gomp-4_0-branch/libgomp/ChangeLog


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

* [Bug c++/66053] openmp target data mappings containing this pointers
  2015-05-07 16:36 [Bug c++/66053] New: openmp target data mappings containing this pointers cesar at gcc dot gnu.org
  2015-06-10 11:37 ` [Bug c++/66053] " jsm28 at gcc dot gnu.org
@ 2015-08-24  9:35 ` jakub at gcc dot gnu.org
  2024-04-04 20:54 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-08-24  9:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66053

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
this is in OpenMP 4.1 only allowed in #pragma omp declare simd clauses, not
anywhere else (it is not a variable in the language).  It might change in
OpenMP 5.0.


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

* [Bug c++/66053] openmp target data mappings containing this pointers
  2015-05-07 16:36 [Bug c++/66053] New: openmp target data mappings containing this pointers cesar at gcc dot gnu.org
  2015-06-10 11:37 ` [Bug c++/66053] " jsm28 at gcc dot gnu.org
  2015-08-24  9:35 ` jakub at gcc dot gnu.org
@ 2024-04-04 20:54 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-04 20:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66053

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |12.0
         Resolution|---                         |FIXED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 12 via the patch which fixed PR 92120 .

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

end of thread, other threads:[~2024-04-04 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 16:36 [Bug c++/66053] New: openmp target data mappings containing this pointers cesar at gcc dot gnu.org
2015-06-10 11:37 ` [Bug c++/66053] " jsm28 at gcc dot gnu.org
2015-08-24  9:35 ` jakub at gcc dot gnu.org
2024-04-04 20:54 ` pinskia at gcc dot gnu.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).