File tree 5 files changed +30
-2
lines changed
5 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 1
1
2009-12-04 Jason Merrill <
[email protected] >
2
2
3
+ PR c++/42010
4
+ * cp-tree.h (DECL_DISCRIMINATOR_SET_P): New.
5
+ * mangle.c (discriminator_for_local_entity): Check it.
6
+
3
7
PR c++/42277
4
8
* semantics.c (finish_decltype_type): Defer handling of decltype
5
9
of a non-dependent COMPONENT_REF in a template.
Original file line number Diff line number Diff line change @@ -2052,6 +2052,10 @@ struct GTY(()) lang_decl {
2052
2052
/* Discriminator for name mangling. */
2053
2053
#define DECL_DISCRIMINATOR (NODE ) (LANG_DECL_U2_CHECK (NODE, 1 )->discriminator)
2054
2054
2055
+ /* True iff DECL_DISCRIMINATOR is set for a DECL_DISCRIMINATOR_P decl. */
2056
+ #define DECL_DISCRIMINATOR_SET_P (NODE ) \
2057
+ (DECL_LANG_SPECIFIC (NODE) && DECL_LANG_SPECIFIC (NODE)->u.base.u2sel == 1 )
2058
+
2055
2059
/* The index of a user-declared parameter in its function, starting at 1.
2056
2060
All artificial parameters will have index 0. */
2057
2061
#define DECL_PARM_INDEX (NODE ) \
Original file line number Diff line number Diff line change @@ -1577,11 +1577,11 @@ discriminator_for_local_entity (tree entity)
1577
1577
{
1578
1578
if (DECL_DISCRIMINATOR_P (entity ))
1579
1579
{
1580
- if (DECL_LANG_SPECIFIC (entity ))
1580
+ if (DECL_DISCRIMINATOR_SET_P (entity ))
1581
1581
return DECL_DISCRIMINATOR (entity );
1582
1582
else
1583
1583
/* The first entity with a particular name doesn't get
1584
- DECL_LANG_SPECIFIC/ DECL_DISCRIMINATOR. */
1584
+ DECL_DISCRIMINATOR set up . */
1585
1585
return 0 ;
1586
1586
}
1587
1587
else if (TREE_CODE (entity ) == TYPE_DECL )
Original file line number Diff line number Diff line change 1
1
2009-12-04 Jason Merrill <
[email protected] >
2
2
3
+ PR c++/42010
4
+ * g++.dg/abi/local2.C: New.
5
+
3
6
PR c++/42277
4
7
* g++.dg/cpp0x/decltype20.C: New.
5
8
Original file line number Diff line number Diff line change
1
+ // PR c++/42010
2
+ // { dg-final { scan-assembler "ZZN1A1fEvE1s" } }
3
+
4
+ struct A {
5
+ static int f ()
6
+ {
7
+ static struct {
8
+ int i ;
9
+ } s ;
10
+ return s .i ;
11
+ }
12
+ };
13
+
14
+ int main ()
15
+ {
16
+ return A ::f ();
17
+ }
You can’t perform that action at this time.
0 commit comments