[Bug 1593608] Re: __FUNCTION__ causes g++ internal compiler error in constexpr functions
Martin Pitt
martin.pitt at ubuntu.com
Sat Jul 2 11:09:01 UTC 2016
Hello Curtis, or anyone else affected,
Accepted gcc-5 into xenial-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/gcc-5/5.4.0-6ubuntu1~16.04 in a few
hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed. Your feedback will aid us getting this update
out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed. In either case, details of your testing will help
us make a better decision.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance!
** Changed in: gcc-5 (Ubuntu Xenial)
Status: New => Fix Committed
** Tags added: verification-needed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-5 in Ubuntu.
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:
Fix Committed
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
More information about the foundations-bugs
mailing list