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
8d40d877
Commit
8d40d877
authored
Feb 09, 2013
by
Jason Merrill
Committed by
Jason Merrill
Feb 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl.c (decls_match): Check versions later.
From-SVN: r195921
parent
d982e024
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
30 deletions
+31
-30
gcc/cp/ChangeLog
+2
-0
gcc/cp/decl.c
+29
-30
No files found.
gcc/cp/ChangeLog
View file @
8d40d877
2013-02-09 Jason Merrill <jason@redhat.com>
* decl.c (decls_match): Check versions later.
PR c++/56238
* pt.c (build_non_dependent_expr): Don't try to fold
instantiation-dependent expressions.
...
...
gcc/cp/decl.c
View file @
8d40d877
...
...
@@ -976,36 +976,6 @@ decls_match (tree newdecl, tree olddecl)
if
(
t1
!=
t2
)
return
0
;
/* The decls dont match if they correspond to two different versions
of the same function. Disallow extern "C" functions to be
versions for now. */
if
(
compparms
(
p1
,
p2
)
&&
same_type_p
(
TREE_TYPE
(
f1
),
TREE_TYPE
(
f2
))
&&
!
DECL_EXTERN_C_P
(
newdecl
)
&&
!
DECL_EXTERN_C_P
(
olddecl
)
&&
targetm
.
target_option
.
function_versions
(
newdecl
,
olddecl
))
{
/* Mark functions as versions if necessary. Modify the mangled decl
name if necessary. */
if
(
DECL_FUNCTION_VERSIONED
(
newdecl
)
&&
DECL_FUNCTION_VERSIONED
(
olddecl
))
return
0
;
if
(
!
DECL_FUNCTION_VERSIONED
(
newdecl
))
{
DECL_FUNCTION_VERSIONED
(
newdecl
)
=
1
;
if
(
DECL_ASSEMBLER_NAME_SET_P
(
newdecl
))
mangle_decl
(
newdecl
);
}
if
(
!
DECL_FUNCTION_VERSIONED
(
olddecl
))
{
DECL_FUNCTION_VERSIONED
(
olddecl
)
=
1
;
if
(
DECL_ASSEMBLER_NAME_SET_P
(
olddecl
))
mangle_decl
(
olddecl
);
}
record_function_versions
(
olddecl
,
newdecl
);
return
0
;
}
if
(
CP_DECL_CONTEXT
(
newdecl
)
!=
CP_DECL_CONTEXT
(
olddecl
)
&&
!
(
DECL_EXTERN_C_P
(
newdecl
)
&&
DECL_EXTERN_C_P
(
olddecl
)))
...
...
@@ -1063,6 +1033,35 @@ decls_match (tree newdecl, tree olddecl)
}
else
types_match
=
0
;
/* The decls dont match if they correspond to two different versions
of the same function. Disallow extern "C" functions to be
versions for now. */
if
(
types_match
&&
!
DECL_EXTERN_C_P
(
newdecl
)
&&
!
DECL_EXTERN_C_P
(
olddecl
)
&&
targetm
.
target_option
.
function_versions
(
newdecl
,
olddecl
))
{
/* Mark functions as versions if necessary. Modify the mangled decl
name if necessary. */
if
(
DECL_FUNCTION_VERSIONED
(
newdecl
)
&&
DECL_FUNCTION_VERSIONED
(
olddecl
))
return
0
;
if
(
!
DECL_FUNCTION_VERSIONED
(
newdecl
))
{
DECL_FUNCTION_VERSIONED
(
newdecl
)
=
1
;
if
(
DECL_ASSEMBLER_NAME_SET_P
(
newdecl
))
mangle_decl
(
newdecl
);
}
if
(
!
DECL_FUNCTION_VERSIONED
(
olddecl
))
{
DECL_FUNCTION_VERSIONED
(
olddecl
)
=
1
;
if
(
DECL_ASSEMBLER_NAME_SET_P
(
olddecl
))
mangle_decl
(
olddecl
);
}
record_function_versions
(
olddecl
,
newdecl
);
return
0
;
}
}
else
if
(
TREE_CODE
(
newdecl
)
==
TEMPLATE_DECL
)
{
...
...
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