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
3135284b
Commit
3135284b
authored
Apr 11, 2002
by
Richard Sandiford
Committed by
Richard Sandiford
Apr 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.dg/ext/attrib5.C: New test.
From-SVN: r52160
parent
d75ff184
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.dg/ext/attrib5.C
+27
-0
No files found.
gcc/testsuite/ChangeLog
View file @
3135284b
2002-04-11 Richard Sandiford <rsandifo@redhat.com>
* g++.dg/ext/attrib5.C: New test.
2002-04-10 Janis Johnson <janis187@us.ibm.com>
* g77.f-torture/execute/6177.f: New test.
...
...
gcc/testsuite/g++.dg/ext/attrib5.C
0 → 100644
View file @
3135284b
// There were two related problems here, depending on the vintage. At
// one time:
//
// typedef struct A { ... } A __attribute__ ((aligned (16)));
//
// would cause original_types to go into an infinite loop. At other
// times, the attributes applied to an explicit typedef would be lost
// (check_b2 would have a negative size).
// First check that the declaration is accepted and has an effect.
typedef
struct
A
{
int
i
;
}
A
__attribute__
((
aligned
(
16
)));
int
check_A
[
__alignof__
(
A
)
>=
16
?
1
:
-
1
];
// Check that the alignment is only applied to the typedef.
struct
B
{
int
i
;
};
namespace
N
{
typedef
B
B
;
};
typedef
struct
B
B
__attribute__
((
aligned
(
16
)));
N
::
B
b1
;
B
b2
;
int
check_b1
[
__alignof__
(
b1
)
==
__alignof__
(
int
)
?
1
:
-
1
];
int
check_b2
[
__alignof__
(
b2
)
>=
16
?
1
:
-
1
];
// The fix for this case involved a change to lookup_tag. This
// bit just checks against a possible regression.
namespace
N
{
struct
C
;
};
typedef
struct
N
::
C
C
;
// { dg-error "previous declaration" }
struct
C
;
// { dg-error "conflicting types" }
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