public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100277] New: ICE on cuda host code
@ 2021-04-27  1:07 bowie.owens at gmail dot com
  2021-04-27  7:12 ` [Bug c++/100277] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bowie.owens at gmail dot com @ 2021-04-27  1:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100277
           Summary: ICE on cuda host code
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bowie.owens at gmail dot com
  Target Milestone: ---

The attached code to be compiled by the host compiler (g++) after processing by
the nvidia cuda compiler works with g++ 9.x but with 10.3.0 terminates with an
Internal Compiler Error.

Version information:

g++ -v
Using built-in specs.
COLLECT_GCC=/software/gcc/10.3.0/bin/g++
COLLECT_LTO_WRAPPER=/software/gcc/10.3.0/libexec/gcc/x86_64-pc-linux-gnu/10.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-10.3.0/configure --prefix=/software/gcc/10.3.0
--enable-languages=c,c++ --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.0 (GCC)


g++ -c -std=c++17 tmpxft_0000555d_00000000-6_middlegame.cudafe1.ii

Generates console output of:

/software/gcc/10.3.0/include/c++/10.3.0/chrono: In substitution of
'template<class _Rep, class _Period> template<class _Period2> using
__is_harmonic = std::__bool_constant<(std::ratio<((_Period2::num /
std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::num, _Period::num)) *
(_Period::den / std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::den,
_Period::den))), ((_Period2::den / std::chrono::duration<_Rep,
_Period>::_S_gcd(_Period2::den, _Period::den)) * (_Period::num /
std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::num,
_Period::num)))>::den == 1)> [with _Period2 = _Period2; _Rep = _Rep; _Period =
_Period]':
/software/gcc/10.3.0/include/c++/10.3.0/chrono:473:153:   required from here
/software/gcc/10.3.0/include/c++/10.3.0/chrono:428:27: internal compiler error:
Segmentation fault
  428 |  _S_gcd(intmax_t __m, intmax_t __n) noexcept
      |                           ^~~~~~
0xc2be6f crash_signal
        ../../gcc-10.3.0/gcc/toplev.c:328
0x7233ad tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc-10.3.0/gcc/cp/pt.c:15310
0x7363b6 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ../../gcc-10.3.0/gcc/cp/pt.c:13225
0x72eda6 tsubst_aggr_type
        ../../gcc-10.3.0/gcc/cp/pt.c:13428
0x73909f tsubst_function_decl
        ../../gcc-10.3.0/gcc/cp/pt.c:13816
0x72fa49 tsubst_decl
        ../../gcc-10.3.0/gcc/cp/pt.c:14267
0x71da31 tsubst_copy
        ../../gcc-10.3.0/gcc/cp/pt.c:16512
0x72132a tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:20707
0x71fe86 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19274
0x71fe86 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19896
0x71f2bd tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19274
0x71f2bd tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19588
0x71f286 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19274
0x71f286 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19587
0x731864 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19274
0x731864 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:18886
0x7363b6 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ../../gcc-10.3.0/gcc/cp/pt.c:13225
0x72eda6 tsubst_aggr_type
        ../../gcc-10.3.0/gcc/cp/pt.c:13428
0x71eca7 tsubst_qualified_id
        ../../gcc-10.3.0/gcc/cp/pt.c:16215
0x7209cd tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc-10.3.0/gcc/cp/pt.c:19625
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug c++/100277] ICE on cuda host code
  2021-04-27  1:07 [Bug c++/100277] New: ICE on cuda host code bowie.owens at gmail dot com
@ 2021-04-27  7:12 ` rguenth at gcc dot gnu.org
  2021-04-28  1:43 ` ed.gcc at pobox dot com
  2021-06-03 16:50 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-27  7:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
             Target|                            |nvptx
   Last reconfirmed|                            |2021-04-27

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
can you provide tmpxft_0000555d_00000000-6_middlegame.cudafe1.ii please?

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

* [Bug c++/100277] ICE on cuda host code
  2021-04-27  1:07 [Bug c++/100277] New: ICE on cuda host code bowie.owens at gmail dot com
  2021-04-27  7:12 ` [Bug c++/100277] " rguenth at gcc dot gnu.org
@ 2021-04-28  1:43 ` ed.gcc at pobox dot com
  2021-06-03 16:50 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ed.gcc at pobox dot com @ 2021-04-28  1:43 UTC (permalink / raw)
  To: gcc-bugs

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

Eduard Rozenberg <ed.gcc at pobox dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ed.gcc at pobox dot com

--- Comment #2 from Eduard Rozenberg <ed.gcc at pobox dot com> ---
Similar issues (related to Nvidia nvcc, nccl) reported here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100240

My issue started after moving from gcc 10.2.0 to 10.3.0.

10.2.0 worked fine
10.3.0 ICEs with that same `intmax_t __n` segfault

I can't figure out what the problem is, and hoping there will be a patch for
10.3.x because I have to use the gcc my OS provides (10.3.0 currently). Also
there's very litle chance that Nvidia will support gcc 11 or 12 anytime soon
(took them years to support gcc9 and eventually 10).

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

* [Bug c++/100277] ICE on cuda host code
  2021-04-27  1:07 [Bug c++/100277] New: ICE on cuda host code bowie.owens at gmail dot com
  2021-04-27  7:12 ` [Bug c++/100277] " rguenth at gcc dot gnu.org
  2021-04-28  1:43 ` ed.gcc at pobox dot com
@ 2021-06-03 16:50 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2021-06-03 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Looks like a dup

*** This bug has been marked as a duplicate of bug 100102 ***

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

end of thread, other threads:[~2021-06-03 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27  1:07 [Bug c++/100277] New: ICE on cuda host code bowie.owens at gmail dot com
2021-04-27  7:12 ` [Bug c++/100277] " rguenth at gcc dot gnu.org
2021-04-28  1:43 ` ed.gcc at pobox dot com
2021-06-03 16:50 ` redi 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).