Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
7a3a9e68
Commit
7a3a9e68
authored
Nov 12, 2012
by
Jason Merrill
Committed by
Jason Merrill
Nov 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* include/std/complex (real, imag): Add ABI tag in C++11 mode.
From-SVN: r193445
parent
132a1a23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
libstdc++-v3/ChangeLog
+4
-0
libstdc++-v3/include/std/complex
+8
-0
libstdc++-v3/testsuite/26_numerics/complex/abi_tag.cc
+25
-0
No files found.
libstdc++-v3/ChangeLog
View file @
7a3a9e68
2012-11-11 Jason Merrill <jason@redhat.com>
* include/std/complex (real, imag): Add ABI tag in C++11 mode.
2012-11-11 Andreas Schwab <schwab@linux-m68k.org>
2012-11-11 Andreas Schwab <schwab@linux-m68k.org>
* doc/xml/chapter.txml: Remove whitespace inside <keyword>.
* doc/xml/chapter.txml: Remove whitespace inside <keyword>.
...
...
libstdc++-v3/include/std/complex
View file @
7a3a9e68
...
@@ -141,9 +141,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
...
@@ -141,9 +141,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
// DR 387. std::complex over-encapsulated.
__attribute ((__abi_tag__ ("cxx11")))
constexpr _Tp
constexpr _Tp
real() { return _M_real; }
real() { return _M_real; }
__attribute ((__abi_tag__ ("cxx11")))
constexpr _Tp
constexpr _Tp
imag() { return _M_imag; }
imag() { return _M_imag; }
#else
#else
...
@@ -1061,9 +1063,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
...
@@ -1061,9 +1063,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
// DR 387. std::complex over-encapsulated.
__attribute ((__abi_tag__ ("cxx11")))
constexpr float
constexpr float
real() { return __real__ _M_value; }
real() { return __real__ _M_value; }
__attribute ((__abi_tag__ ("cxx11")))
constexpr float
constexpr float
imag() { return __imag__ _M_value; }
imag() { return __imag__ _M_value; }
#else
#else
...
@@ -1210,9 +1214,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
...
@@ -1210,9 +1214,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
// DR 387. std::complex over-encapsulated.
__attribute ((__abi_tag__ ("cxx11")))
constexpr double
constexpr double
real() { return __real__ _M_value; }
real() { return __real__ _M_value; }
__attribute ((__abi_tag__ ("cxx11")))
constexpr double
constexpr double
imag() { return __imag__ _M_value; }
imag() { return __imag__ _M_value; }
#else
#else
...
@@ -1360,9 +1366,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
...
@@ -1360,9 +1366,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
// DR 387. std::complex over-encapsulated.
__attribute ((__abi_tag__ ("cxx11")))
constexpr long double
constexpr long double
real() { return __real__ _M_value; }
real() { return __real__ _M_value; }
__attribute ((__abi_tag__ ("cxx11")))
constexpr long double
constexpr long double
imag() { return __imag__ _M_value; }
imag() { return __imag__ _M_value; }
#else
#else
...
...
libstdc++-v3/testsuite/26_numerics/complex/abi_tag.cc
0 → 100644
View file @
7a3a9e68
// Test that the C++11 variants of real/imag have an ABI tag
// { dg-do compile }
// { dg-options -std=c++11 }
#include <complex>
// { dg-final { scan-assembler "_ZNKSt7complexIfE4realB5cxx11Ev" } }
float
(
std
::
complex
<
float
>::*
p1
)()
const
=
&
std
::
complex
<
float
>::
real
;
// { dg-final { scan-assembler "_ZNKSt7complexIdE4realB5cxx11Ev" } }
double
(
std
::
complex
<
double
>::*
p2
)()
const
=
&
std
::
complex
<
double
>::
real
;
// { dg-final { scan-assembler "_ZNKSt7complexIeE4realB5cxx11Ev" } }
long
double
(
std
::
complex
<
long
double
>::*
p3
)()
const
=
&
std
::
complex
<
long
double
>::
real
;
// { dg-final { scan-assembler "_ZNKSt7complexIiE4realB5cxx11Ev" } }
int
(
std
::
complex
<
int
>::*
p4
)()
const
=
&
std
::
complex
<
int
>::
real
;
// { dg-final { scan-assembler "_ZNKSt7complexIfE4imagB5cxx11Ev" } }
float
(
std
::
complex
<
float
>::*
p5
)()
const
=
&
std
::
complex
<
float
>::
imag
;
// { dg-final { scan-assembler "_ZNKSt7complexIdE4imagB5cxx11Ev" } }
double
(
std
::
complex
<
double
>::*
p6
)()
const
=
&
std
::
complex
<
double
>::
imag
;
// { dg-final { scan-assembler "_ZNKSt7complexIeE4imagB5cxx11Ev" } }
long
double
(
std
::
complex
<
long
double
>::*
p7
)()
const
=
&
std
::
complex
<
long
double
>::
imag
;
// { dg-final { scan-assembler "_ZNKSt7complexIiE4imagB5cxx11Ev" } }
int
(
std
::
complex
<
int
>::*
p8
)()
const
=
&
std
::
complex
<
int
>::
imag
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment