public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111651] New: Specific syntax with C++ 20 designated initializers and coroutines breaks
@ 2023-10-01 11:25 yunus at ayar dot eu
  2023-10-01 11:29 ` [Bug c++/111651] " yunus at ayar dot eu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: yunus at ayar dot eu @ 2023-10-01 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111651
           Summary: Specific syntax with C++ 20 designated initializers
                    and coroutines breaks
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yunus at ayar dot eu
  Target Milestone: ---

The error 'internal compiler error: in build_special_member_call, at
cp/call.cc:11093' occurs in this code:

```cpp
awaitable<void> make(boost::asio::any_io_executor executor)
{
  co_await wdlite::async_new_session(executor, "http://localhost:9515",
                                    
wdlite::capabilities::make(wdlite::capabilities::Capabilities{
                                       .browser_specific =
                                         wdlite::capabilities::ChromeOptions{
                                           // The next line is not ok.
                                           .arguments = { std::to_string(0) },
                                           // The next line is ok.
                                           // .arguments = { "ok" },
                                         },
                                     }),
                                     use_awaitable);
  co_return;
}
```

If I substitute `.arguments = { std::to_string(0) },` with `.arguments = { "ok"
},` the code compiles just fine. `.arguments = { std::to_string(0) },` is not a
problem if I remove the `co_await` keyword. My Boost version is 1.80 and the
Boost.ASIO is 1.24.

The output of `g++ -v`:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --enable-libstdcxx-backtrace
--with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-13.2.1-20230728/obj-x86_64-redhat-linux/isl-install
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-offload-defaulted --enable-gnu-indirect-function --enable-cet
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
--with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.1 20230728 (Red Hat 13.2.1-1) (GCC)

I compiled the attached file (main.cpp.ii) like so:
g++ main.cpp.ii -std=gnu++20

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-01 11:25 [Bug c++/111651] New: Specific syntax with C++ 20 designated initializers and coroutines breaks yunus at ayar dot eu
2023-10-01 11:29 ` [Bug c++/111651] " yunus at ayar dot eu
2023-10-01 21:06 ` pinskia at gcc dot gnu.org
2023-10-02  0:44 ` pinskia at gcc dot gnu.org
2023-10-02  9:11 ` pinskia at gcc dot gnu.org
2023-10-02  9:12 ` pinskia at gcc dot gnu.org
2023-10-02  9:16 ` 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).