[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-08-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #13 from Jonathan Wakely  ---
No, because the same code is generated for -fabi-version=12 and
-fabi-version=13

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-08-16 Thread a3at.mail at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

Azat  changed:

   What|Removed |Added

 CC||a3at.mail at gmail dot com

--- Comment #12 from Azat  ---
Shouldn't such case also be warned by `g++ -Wabi=12` ?

struct noncopyable
{
public:
noncopyable(noncopyable &&) = default;
};
struct S : public noncopyable
{
int i;
};
void foo(S s) {}

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #11 from Jakub Jelinek  ---
Fixed.

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #9 from Jason Merrill  ---
Author: jason
Date: Wed Jun 13 19:39:36 2018
New Revision: 261562

URL: https://gcc.gnu.org/viewcvs?rev=261562&root=gcc&view=rev
Log:
PR c++/86094 - wrong code with defaulted move ctor.

gcc/c-family/
* c-opts.c (c_common_post_options): Bump the current ABI version to
13.  Set warn_abi_version and flag_abi_compat_version to the current
version rather than 0.  Fix defaulting flag_abi_compat_version from
warn_abi_version.
gcc/cp/
* class.c (classtype_has_non_deleted_move_ctor): New.
* tree.c (maybe_warn_parm_abi, type_has_nontrivial_copy_init):
Handle v12 breakage.

Added:
trunk/gcc/testsuite/g++.dg/abi/invisiref2a.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-opts.c
trunk/gcc/common.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/tree.c
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/g++.dg/abi/macro0.C

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #10 from Jason Merrill  ---
Author: jason
Date: Wed Jun 13 19:39:53 2018
New Revision: 261563

URL: https://gcc.gnu.org/viewcvs?rev=261563&root=gcc&view=rev
Log:
PR c++/86094 - wrong code with defaulted move ctor.

gcc/c-family/
* c-opts.c (c_common_post_options): Bump the current ABI version to
13.  Set warn_abi_version and flag_abi_compat_version to the current
version rather than 0.  Fix defaulting flag_abi_compat_version from
warn_abi_version.
gcc/cp/
* class.c (classtype_has_non_deleted_move_ctor): New.
* tree.c (maybe_warn_parm_abi, type_has_nontrivial_copy_init):
Handle v12 breakage.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/abi/invisiref2a.C
Modified:
branches/gcc-8-branch/gcc/c-family/ChangeLog
branches/gcc-8-branch/gcc/c-family/c-opts.c
branches/gcc-8-branch/gcc/common.opt
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/class.c
branches/gcc-8-branch/gcc/cp/cp-tree.h
branches/gcc-8-branch/gcc/cp/tree.c
branches/gcc-8-branch/gcc/doc/invoke.texi
branches/gcc-8-branch/gcc/testsuite/g++.dg/abi/macro0.C

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #8 from Richard Biener  ---
Note if there's any ABI change between 8.1 and 8.2 please adjust changes.html
to note this as a caveat (even if the 7.3 -> 8.1 change was unintended).

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #7 from Richard Biener  ---
Fixed?

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Mon Jun 11 18:40:14 2018
New Revision: 261445

URL: https://gcc.gnu.org/viewcvs?rev=261445&root=gcc&view=rev
Log:
PR c++/86094 - wrong code with defaulted move ctor.

* tree.c (type_has_nontrivial_copy_init): Fix move ctor handling.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/abi/invisiref2.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/tree.c

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Mon Jun 11 18:38:52 2018
New Revision: 261444

URL: https://gcc.gnu.org/viewcvs?rev=261444&root=gcc&view=rev
Log:
PR c++/86094 - wrong code with defaulted move ctor.

* tree.c (type_has_nontrivial_copy_init): Fix move ctor handling.

Added:
trunk/gcc/testsuite/g++.dg/abi/invisiref2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/tree.c

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #4 from Jason Merrill  ---
(In reply to Alexander Monakov from comment #3)
> -fabi-version=12 is not documented, not mentioned in release notes, and not
> wired up in -Wabi.

-Wabi=11 warns about this.  With an incorrect message, since this is a bug. 
I'll also fix the documentation.

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

Jason Merrill  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-06-11
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #3 from Alexander Monakov  ---
-fabi-version=12 is not documented, not mentioned in release notes, and not
wired up in -Wabi.

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely  ---
This changed with:

PR c++/80178 - parameter passing for uncopyable classes

* tree.c (type_has_nontrivial_copy_init): True for classes with
only
deleted copy/move ctors.
(remember_deleted_copy, maybe_warn_parm_abi): New.
* decl.c (require_complete_types_for_parms, check_function_type):
Call maybe_warn_parm_abi.
* call.c (convert_for_arg_passing, build_cxx_call): Likewise.

(Which didn't document -fabi-version=12 in invoke.texi)

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

--- Comment #1 from Jonathan Wakely  ---
This is controlled by -fabi-version=12 (the default in gcc 8).

[Bug c++/86094] [8/9 Regression] Call ABI changed for small objects with defaulted ctor

2018-06-09 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86094

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |8.2
   Severity|normal  |blocker