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
59bce4ad
Commit
59bce4ad
authored
Aug 26, 2019
by
Jason Merrill
Committed by
Jason Merrill
Aug 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl.c (duplicate_decls): Always merge DECL_DECLARED_CONSTEXPR_P.
From-SVN: r274932
parent
f7cf1751
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
gcc/cp/ChangeLog
+4
-0
gcc/cp/decl.c
+2
-3
gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration2.C
+5
-0
No files found.
gcc/cp/ChangeLog
View file @
59bce4ad
2019-08-26 Jason Merrill <jason@redhat.com>
* decl.c (duplicate_decls): Always merge DECL_DECLARED_CONSTEXPR_P.
2019-08-26 Marek Polacek <polacek@redhat.com>
2019-08-26 Marek Polacek <polacek@redhat.com>
PR c++/91545 - ICE in constexpr store evaluation.
PR c++/91545 - ICE in constexpr store evaluation.
...
...
gcc/cp/decl.c
View file @
59bce4ad
...
@@ -2204,9 +2204,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
...
@@ -2204,9 +2204,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
SET_DECL_DEPENDENT_INIT_P
(
newdecl
,
true
);
SET_DECL_DEPENDENT_INIT_P
(
newdecl
,
true
);
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
(
newdecl
)
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
(
newdecl
)
|=
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
(
olddecl
);
|=
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
(
olddecl
);
if
(
DECL_CLASS_SCOPE_P
(
olddecl
))
DECL_DECLARED_CONSTEXPR_P
(
newdecl
)
DECL_DECLARED_CONSTEXPR_P
(
newdecl
)
|=
DECL_DECLARED_CONSTEXPR_P
(
olddecl
);
|=
DECL_DECLARED_CONSTEXPR_P
(
olddecl
);
/* Merge the threadprivate attribute from OLDDECL into NEWDECL. */
/* Merge the threadprivate attribute from OLDDECL into NEWDECL. */
if
(
DECL_LANG_SPECIFIC
(
olddecl
)
if
(
DECL_LANG_SPECIFIC
(
olddecl
)
...
...
gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration2.C
0 → 100644
View file @
59bce4ad
// { dg-do compile { target c++11 } }
constexpr
float
pi
=
3
.
14
;
extern
const
float
pi
;
constexpr
float
x
=
pi
;
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