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
3734964f
Commit
3734964f
authored
Apr 23, 2014
by
Dinar Temirbulatov
Committed by
Dinar Temirbulatov
Apr 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for c++/PR57958
From-SVN: r209721
parent
7de90a6c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
gcc/cp/ChangeLog
+6
-0
gcc/cp/semantics.c
+2
-0
gcc/testsuite/g++.dg/cpp0x/pr57958.C
+39
-0
No files found.
gcc/cp/ChangeLog
View file @
3734964f
2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
PR c++/57958
* semantics.c (apply_deduced_return_type): Complete non-void type
before estimating whether the type is aggregate.
2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2014-04-22 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/43622
PR libstdc++/43622
...
...
gcc/cp/semantics.c
View file @
3734964f
...
@@ -10650,6 +10650,8 @@ apply_deduced_return_type (tree fco, tree return_type)
...
@@ -10650,6 +10650,8 @@ apply_deduced_return_type (tree fco, tree return_type)
if
(
!
processing_template_decl
)
if
(
!
processing_template_decl
)
{
{
if
(
!
VOID_TYPE_P
(
TREE_TYPE
(
result
)))
complete_type_or_else
(
TREE_TYPE
(
result
),
NULL_TREE
);
bool
aggr
=
aggregate_value_p
(
result
,
fco
);
bool
aggr
=
aggregate_value_p
(
result
,
fco
);
#ifdef PCC_STATIC_STRUCT_RETURN
#ifdef PCC_STATIC_STRUCT_RETURN
cfun
->
returns_pcc_struct
=
aggr
;
cfun
->
returns_pcc_struct
=
aggr
;
...
...
gcc/testsuite/g++.dg/cpp0x/pr57958.C
0 → 100644
View file @
3734964f
// { dg-do run { target c++11 } }
#define assert(E) if(!(E))__builtin_abort();
int
n
=
0
;
template
<
class
T
>
class
Foo
{
public
:
Foo
()
{
n
--
;
}
Foo
(
const
Foo
&
)
{
n
--
;
}
~
Foo
()
{
n
++
;
}
};
struct
Data
{};
void
a
()
{
Data
b
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
auto
fn
=
[]
(
const
Foo
<
Data
>&
x
)
{
return
(
x
);
};
{
Foo
<
Data
>
a
;
fn
(
a
);
}
assert
(
n
==
0
);
}
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