mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
Fix gnuv3_pass_by_reference to treat dynamic classes as non-trivial.
gdb/ChangeLog: * gnu-v3-abi.c (gnuv3_pass_by_reference): Treat dynamic classes as non-trivial.
This commit is contained in:
parent
2d1c107c1b
commit
ebb8ece2ef
@ -1,3 +1,8 @@
|
||||
2014-10-15 Siva Chandra Reddy <sivachandra@google.com>
|
||||
|
||||
* gnu-v3-abi.c (gnuv3_pass_by_reference): Treat dynamic classes
|
||||
as non-trivial.
|
||||
|
||||
2014-10-15 Siva Chandra Reddy <sivachandra@google.com>
|
||||
|
||||
PR c++/13403
|
||||
|
@ -1281,6 +1281,11 @@ gnuv3_pass_by_reference (struct type *type)
|
||||
&& TYPE_CODE (type) != TYPE_CODE_UNION)
|
||||
return 0;
|
||||
|
||||
/* A dynamic class has a non-trivial copy constructor.
|
||||
See c++98 section 12.8 Copying class objects [class.copy]. */
|
||||
if (gnuv3_dynamic_class (type))
|
||||
return 1;
|
||||
|
||||
for (fieldnum = 0; fieldnum < TYPE_NFN_FIELDS (type); fieldnum++)
|
||||
for (fieldelem = 0; fieldelem < TYPE_FN_FIELDLIST_LENGTH (type, fieldnum);
|
||||
fieldelem++)
|
||||
|
Loading…
Reference in New Issue
Block a user