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
5f8f4751
Commit
5f8f4751
authored
Jun 20, 2000
by
Nathan Sidwell
Committed by
Nathan Sidwell
Jun 20, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.old-deja/g++.other/dyncast6.C: New test.
From-SVN: r34620
parent
0f1e25b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
0 deletions
+76
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.old-deja/g++.other/dyncast6.C
+72
-0
No files found.
gcc/testsuite/ChangeLog
View file @
5f8f4751
2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/dyncast6.C: New test.
2000-06-15 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/loop-6.c: New test.
...
...
gcc/testsuite/g++.old-deja/g++.other/dyncast6.C
0 → 100644
View file @
5f8f4751
// Special g++ Options: -w -ansi -pedantic-errors
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 20 June 2000 <nathan@codesourcery.com>
// Origin GNATS bug report 143 from Carlo Wood <carlo@runaway.xs4all.nl>
// We were generating incorrect type_info structures, and hence breaking
// dynamic_cast.
#include <stdio.h>
class
OBASE
{
public
:
virtual
void
bz
()
{}};
class
IBASE
{
public
:
virtual
void
by
()
{}};
class
V
{
public
:
int
m
;
};
class
A
:
public
virtual
V
{
};
class
AA
:
public
A
{};
class
B
:
public
OBASE
,
public
A
{
public
:
virtual
void
foo
(
void
)
{
}
};
class
B1
:
public
OBASE
,
public
AA
{
public
:
virtual
void
foo
(
void
)
{
}
};
class
C
:
public
IBASE
,
public
virtual
V
{
};
class
D
:
public
B
,
public
C
{
};
class
E
:
public
B
,
public
virtual
V
{
};
class
E1
:
public
B1
,
public
virtual
V
{};
class
E2
:
public
B1
,
public
A
,
public
virtual
V
{};
int
main
(
void
)
{
D
d
;
E
e
;
E1
e1
;
E2
e2
;
int
code
=
0
;
OBASE
*
osd
=
&
d
;
OBASE
*
ose
=
&
e
;
OBASE
*
ose1
=
&
e1
;
OBASE
*
ose2
=
&
e2
;
if
(
!
dynamic_cast
<
V
*>
(
osd
))
{
printf
(
"fail osd
\n
"
);
code
++
;
}
if
(
!
dynamic_cast
<
V
*>
(
ose
))
{
printf
(
"fail ose
\n
"
);
code
++
;
}
if
(
!
dynamic_cast
<
V
*>
(
ose1
))
{
printf
(
"fail ose1
\n
"
);
code
++
;
}
if
(
!
dynamic_cast
<
V
*>
(
ose2
))
{
printf
(
"fail ose2
\n
"
);
code
++
;
}
return
code
;
}
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