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
32d3f634
Commit
32d3f634
authored
May 21, 2002
by
Brian R. Gaeke
Committed by
Alexandre Oliva
May 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.dg/other/copy2.C: New test.
From-SVN: r53692
parent
c8a3d889
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.dg/other/copy2.C
+32
-0
No files found.
gcc/testsuite/ChangeLog
View file @
32d3f634
Tue May 21 14:25:32 2002 Brian R. Gaeke <brg@dgate.ORG>
* g++.dg/other/copy2.C: New test.
Mon May 20 10:51:35 2002 J"orn Rennecke <joern.rennecke@superh.com>
* gcc.c-torture/execute/memcpy-2.c (SEQUENCE_LENGTH): Define.
...
...
gcc/testsuite/g++.dg/other/copy2.C
0 → 100644
View file @
32d3f634
// { dg-do run }
// Test that A's copy assignment method is called when B's instance
// member array of A is assigned.
// Contributed by Brian Gaeke, public domain.
int
status
=
1
;
class
A
{
public
:
int
i
;
A
&
operator
=
(
const
A
&
i
)
{
status
=
0
;
}
};
class
B
{
public
:
A
arr
[
10
];
};
int
main
(
int
argc
,
char
**
argv
)
{
B
b
;
b
.
arr
[
0
].
i
=
15
;
B
a
;
a
=
b
;
// trigger copy assignment
return
status
;
}
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