← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1593608] Re: __FUNCTION__ causes g++ internal compiler error in constexpr functions

 

** Also affects: gcc-5 (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Changed in: gcc-5 (Ubuntu)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1593608

Title:
  __FUNCTION__ causes g++ internal compiler error in constexpr functions

Status in gcc-5 package in Ubuntu:
  Fix Released
Status in gcc-5 source package in Xenial:
  New

Bug description:
  // bug.cpp
  // g++ -std=c++14 bug.cpp -DCAUSE_GCC_INTERNAL_COMPILER_ERROR
  inline constexpr bool bug() noexcept {
  #ifdef CAUSE_GCC_INTERNAL_COMPILER_ERROR
    auto tmp = __FUNCTION__; // same for __PRETTY_FUNCTION__
  #else
    auto tmp = "bug";
  #endif
    return true;
  }
  static_assert(bug(), "g++ 5.3.1 bug");
  int main(int, const char *[]) { return 0; }

  $ g++ -std=c++14 bug.cpp

  $ g++ -std=c++14 bug.cpp -DCAUSE_GCC_INTERNAL_COMPILER_ERROR
  bug.cpp:11:18:   in constexpr expansion of ‘bug()’
  bug.cpp:11:38: internal compiler error: Segmentation fault
   static_assert(bug(), "g++ 5.3.1 bug");
                                        ^
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

  $ gcc --version
  gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413
  Copyright (C) 2015 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  $ cat /etc/lsb-release 
  DISTRIB_ID=Ubuntu
  DISTRIB_RELEASE=16.04
  DISTRIB_CODENAME=xenial
  DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1593608/+subscriptions