g++10.3 Segmentation fault when compiling CUDA code

Bug #1944777 reported by quicky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-10 (Ubuntu)
Fix Released
Medium
Matthias Klose

Bug Description

> lsb_release -rd
Description: Ubuntu 20.04.1 LTS
Release: 20.04

>apt-cache policy gcc-10
gcc-10:
  Installed: 10.3.0-1ubuntu1~20.04
  Candidate: 10.3.0-1ubuntu1~20.04
  Version table:
 *** 10.3.0-1ubuntu1~20.04 500
        500 http://fr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     10-20200411-0ubuntu1 500
        500 http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

I expect to be able to compile CUDA code with gcc-10.
It was working with gcc 10.2 and failed with gcc-10.3
When compiling CUDA code g++-10.3 failed with following error message
/usr/include/c++/10/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]’:
/usr/include/c++/10/chrono:473:154: required from here
/usr/include/c++/10/chrono:428:27: internal compiler error: Segmentation fault
  428 | _S_gcd(intmax_t __m, intmax_t __n) noexcept
      | ^~~~~~

This bug has been corrected in gcc-10.4 :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102

Could it be possible to make Ubuntu 20.04 gcc-10 package use gcc-10.4 instead of 10.3 ?

quicky (julien-thevenon)
description: updated
Revision history for this message
Matthias Klose (doko) wrote :

GCC 10.04 won't be release before early 2022. I'll see to get a backport into 20.04 LTS.

Changed in gcc-10 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Matthias Klose (doko)
Revision history for this message
quicky (julien-thevenon) wrote :

OK thanks

Revision history for this message
Matthias Klose (doko) wrote :

10.5.0 is now available in 20.04

Changed in gcc-10 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
quicky (julien-thevenon) wrote :

Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.