public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97549] New: include/pstl rebase breaking <execution>
@ 2020-10-23 15:16 nathan at gcc dot gnu.org
  2020-11-04 13:52 ` [Bug libstdc++/97549] [11 Regression] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-10-23 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97549
           Summary: include/pstl rebase breaking <execution>
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

I'm seeing compilation errors of a file that just contains:

#include <execution>

following 
* e957b86ca26 2020-10-21 | libstdc++: Rebase include/pstl to current upstream
[Thomas Rodgers]


/data/users/nathans/me/r-e957b86ca26/obj/x86_64/gcc/testsuite/g++/../../xg++
-B/data/users/nathans/me/r-e957b86ca26/obj/x86_64/gcc/testsuite/g++/../../    
-g
-I/data/users/nathans/me/r-e957b86ca26/src/gcc/testsuite/../../libsanitizer/include
-fdiagnostics-plain-output  -nostdinc++
-I/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include
-I/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/libsupc++
-I/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/backward
-I/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/testsuite/util
-fmessage-length=0   -O2       
-L/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/./libstdc++-v3/src/.libs

-B/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/./libstdc++-v3/src/.libs

-L/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/./libstdc++-v3/src/.libs
-B/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/./libitm/
-L/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/./libitm/.libs
-lm  -c xtreme-header-2_a.C

In file included from
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/parallel_backend.h:14,
                 from
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/algorithm_impl.h:22,
                 from
/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/pstl/glue_execution_defs.h:50,
                 from
/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/execution:32,
                 from xtreme-header-2_a.C:5:
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/parallel_backend_serial.h:134:25:
error: '__serial' is not a namespace-name; did you mean '__internal'?
In file included from
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/algorithm_impl.h:22,
                 from
/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/pstl/glue_execution_defs.h:50,
                 from
/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/execution:32,
                 from xtreme-header-2_a.C:5:
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/parallel_backend.h:17:43:
error: 'namespace __pstl::__par_backend = __pstl::__pstl::__serial_backend;'
conflicts with a previous declaration
In file included from
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/parallel_backend.h:14,
                 from
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/algorithm_impl.h:22,
                 from
/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/pstl/glue_execution_defs.h:50,
                 from
/data/users/nathans/me/r-e957b86ca26/obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/execution:32,
                 from xtreme-header-2_a.C:5:
/data/users/nathans/me/r-e957b86ca26/src/libstdc++-v3/include/pstl/parallel_backend_serial.h:132:11:
note: previous declaration 'namespace __pstl::__par_backend { }'

... more errors follow,
it seems parallel_backend.h is being #included twice, with inconsistent
settings of _PSTL_PAR_BACKEND_SERIAL and _PSTL_PAR_BACKEND_TBB

am I missing something?

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
@ 2020-11-04 13:52 ` redi at gcc dot gnu.org
  2020-12-15 12:32 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-04 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |11.0
     Ever confirmed|0                           |1
           Keywords|                            |rejects-valid
            Summary|include/pstl rebase         |[11 Regression]
                   |breaking <execution>        |include/pstl rebase
                   |                            |breaking <execution>
   Last reconfirmed|                            |2020-11-04

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed.

There's not much point including <execution> without TBB installed, but it
should still compile even if it's only going to use the serial backend.

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
  2020-11-04 13:52 ` [Bug libstdc++/97549] [11 Regression] " redi at gcc dot gnu.org
@ 2020-12-15 12:32 ` redi at gcc dot gnu.org
  2020-12-15 12:37 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-15 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There are also errors when compiling with the Intel compiler and tbb from
oneAPI (aka tbb 2021.1.1):

In file included from /usr/include/c++/10/pstl/parallel_backend.h(16),
                 from /usr/include/c++/10/pstl/algorithm_impl.h(22),
                 from /usr/include/c++/10/pstl/glue_execution_defs.h(50),
                 from /usr/include/c++/10/execution(32),
                 from pstl.C(1):
/usr/include/c++/10/pstl/parallel_backend_tbb.h(70): error: name followed by
"::" must be a class or namespace name
      tbb::task::self().group()->cancel_group_execution();
           ^

In file included from /usr/include/c++/10/pstl/parallel_backend.h(16),
                 from /usr/include/c++/10/pstl/algorithm_impl.h(22),
                 from /usr/include/c++/10/pstl/glue_execution_defs.h(50),
                 from /usr/include/c++/10/execution(32),
                 from pstl.C(1):
/usr/include/c++/10/pstl/parallel_backend_tbb.h(413): error: namespace "tbb"
has no member class "task"
  class __merge_task : public tbb::task
                                   ^

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
  2020-11-04 13:52 ` [Bug libstdc++/97549] [11 Regression] " redi at gcc dot gnu.org
  2020-12-15 12:32 ` redi at gcc dot gnu.org
@ 2020-12-15 12:37 ` redi at gcc dot gnu.org
  2021-01-14  9:30 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-15 12:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #2)
> There are also errors when compiling with the Intel compiler and tbb from
> oneAPI (aka tbb 2021.1.1):

Which is documented as not working, due to API changes in tbb:
https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-threading-building-blocks-release-notes.html

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-12-15 12:37 ` redi at gcc dot gnu.org
@ 2021-01-14  9:30 ` rguenth at gcc dot gnu.org
  2021-02-19 11:08 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-01-14  9:30 ` rguenth at gcc dot gnu.org
@ 2021-02-19 11:08 ` jakub at gcc dot gnu.org
  2021-02-23  8:28 ` cvs-commit at gcc dot gnu.org
  2021-02-23  9:10 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-19 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
After rpm -e tbb-devel , I can reproduce.
The following fixes it for me.
In GCC 10, parallel_backend.h just included parallel_backend_{serial,tbb}.h and
did nothing beyond that, and parallel_backend_tbb.h provided directly
namespace __pstl { namespace __par_backend { ... } }
and defined everything in there, while parallel_backend_serial.h did:
namespace __pstl { namespace __serial { ... } } and had this
namespace __pstl { namespace __par_backend { using namespace __pstl::__serial;
} }
at the end.
in GCC 11, parallel_backend.h does:
namespace __pstl { namespace __par_backend = __serial_backend; }
after including parallel_backend_serial.h or
namespace __pstl { namespace __par_backend = __tbb_backend; }
after including parallel_backend_tbb.h.  The latter then has:
namespace __pstl { namespace __tbb_backend { ... } }
and no using etc. at the end, while parallel_backend_serial.h changed to:
namespace __pstl { namespace __serial_backend { ... } }
but has this leftover block from the GCC 10 times.  Even changing that
using namespace __pstl::__serial;
to
using namespace __pstl::__serial_backend;
doesn't work, as it clashes with
namespace __pstl { namespace __par_backend = __serial_backend; }
in parallel_backend.h.

2021-02-19  Jakub Jelinek  <jakub@redhat.com>

        * include/pstl/parallel_backend_serial.h: Remove
        __pstl::__par_backend.

--- libstdc++-v3/include/pstl/parallel_backend_serial.h.jj      2020-10-21
19:33:24.059872401 +0200
+++ libstdc++-v3/include/pstl/parallel_backend_serial.h 2021-02-19
11:59:56.414645219 +0100
@@ -127,12 +127,4 @@ __parallel_invoke(_ExecutionPolicy&&, _F
 } // namespace __serial_backend
 } // namespace __pstl

-namespace __pstl
-{
-namespace __par_backend
-{
-using namespace __pstl::__serial;
-}
-} // namespace __pstl
-
 #endif /* _PSTL_PARALLEL_BACKEND_SERIAL_H */

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-02-19 11:08 ` jakub at gcc dot gnu.org
@ 2021-02-23  8:28 ` cvs-commit at gcc dot gnu.org
  2021-02-23  9:10 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-23  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:7e647d71d556b73e84f4edd0733bcc83bc70ae1e

commit r11-7339-g7e647d71d556b73e84f4edd0733bcc83bc70ae1e
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Feb 23 09:26:23 2021 +0100

    libstdc++: Fix up parallel_backend_serial.h [PR97549]

    In GCC 10, parallel_backend.h just included parallel_backend_{serial,tbb}.h
and
    did nothing beyond that, and parallel_backend_tbb.h provided directly
    namespace __pstl { namespace __par_backend { ... } }
    and defined everything in there, while parallel_backend_serial.h did:
    namespace __pstl { namespace __serial { ... } } and had this
    namespace __pstl { namespace __par_backend { using namespace
__pstl::__serial; } }
    at the end.
    In GCC 11, parallel_backend.h does:
    namespace __pstl { namespace __par_backend = __serial_backend; }
    after including parallel_backend_serial.h or
    namespace __pstl { namespace __par_backend = __tbb_backend; }
    after including parallel_backend_tbb.h.  The latter then has:
    namespace __pstl { namespace __tbb_backend { ... } }
    and no using etc. at the end, while parallel_backend_serial.h changed to:
    namespace __pstl { namespace __serial_backend { ... } }
    but has this leftover block from the GCC 10 times.  Even changing that
    using namespace __pstl::__serial;
    to
    using namespace __pstl::__serial_backend;
    doesn't work, as it clashes with
    namespace __pstl { namespace __par_backend = __serial_backend; }
    in parallel_backend.h.

    2021-02-23  Jakub Jelinek  <jakub@redhat.com>

            PR libstdc++/97549
            * include/pstl/parallel_backend_serial.h: Remove
__pstl::__par_backend.

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

* [Bug libstdc++/97549] [11 Regression] include/pstl rebase breaking <execution>
  2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-02-23  8:28 ` cvs-commit at gcc dot gnu.org
@ 2021-02-23  9:10 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-23  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-02-23  9:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 15:16 [Bug libstdc++/97549] New: include/pstl rebase breaking <execution> nathan at gcc dot gnu.org
2020-11-04 13:52 ` [Bug libstdc++/97549] [11 Regression] " redi at gcc dot gnu.org
2020-12-15 12:32 ` redi at gcc dot gnu.org
2020-12-15 12:37 ` redi at gcc dot gnu.org
2021-01-14  9:30 ` rguenth at gcc dot gnu.org
2021-02-19 11:08 ` jakub at gcc dot gnu.org
2021-02-23  8:28 ` cvs-commit at gcc dot gnu.org
2021-02-23  9:10 ` jakub 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).