diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c658220..06dbadb 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11126,6 +11126,10 @@ static int decl_quals (const_tree decl) { return ((TREE_READONLY (decl) + /* The C++ front-end correctly marks reference-typed + variables as readonly, but from a language (and debug + info) standpoint they are not const-qualified. */ + && TREE_CODE (TREE_TYPE (decl)) != REFERENCE_TYPE ? TYPE_QUAL_CONST : TYPE_UNQUALIFIED) | (TREE_THIS_VOLATILE (decl) ? TYPE_QUAL_VOLATILE : TYPE_UNQUALIFIED)); |