public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute
@ 2015-05-20 12:33 npl at chello dot at
  2015-05-20 13:01 ` [Bug c++/66216] [6 Regression] Defaulted Operators and constructors " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: npl at chello dot at @ 2015-05-20 12:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216

            Bug ID: 66216
           Summary: Defaulted Operators and contructors not working with
                    aligned attribute
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: npl at chello dot at
  Target Milestone: ---

The code below will not compile, faulting with defaulted declaration 'xx' does
not match expected signature.
This behaviour is in any gcc version from 4.7 - 5

// g++ -std=c++11 -c  testalign.cpp

class CMymy
{
        unsigned char _a;
        unsigned char _b;
public:
        constexpr CMymy() : _a(), _b() {}

        constexpr CMymy(const CMymy &) = default;
        CMymy &operator=(const CMymy &) = default;

} __attribute__((aligned(2)));


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/66216] [6 Regression] Defaulted Operators and constructors not working with aligned attribute
  2015-05-20 12:33 [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute npl at chello dot at
@ 2015-05-20 13:01 ` redi at gcc dot gnu.org
  2015-05-20 19:53 ` jamrial at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2015-05-20 13:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code,
                   |                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-20
            Summary|Defaulted Operators and     |[6 Regression] Defaulted
                   |contructors not working     |Operators and constructors
                   |with aligned attribute      |not working with aligned
                   |                            |attribute
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And now it gives an ICE on trunk, so it's regressed from rejects-valid to
ice-on-valid-code:

a.cc:1:7: internal compiler error: canonical types differ for identical types
const CMymy and const CMymy
 class CMymy
        ^
0x1033333f comptypes(tree_node*, tree_node*, int)
        /home/jwakely/src/gcc/gcc/cp/typeck.c:1423
0x1033108b structural_comptypes
        /home/jwakely/src/gcc/gcc/cp/typeck.c:1357
0x103332e7 comptypes(tree_node*, tree_node*, int)
        /home/jwakely/src/gcc/gcc/cp/typeck.c:1415
0x1033675f compparms(tree_node const*, tree_node const*)
        /home/jwakely/src/gcc/gcc/cp/typeck.c:1534
0x10379fc7 defaulted_late_check(tree_node*)
        /home/jwakely/src/gcc/gcc/cp/method.c:1972
0x1029a5ff check_bases_and_members
        /home/jwakely/src/gcc/gcc/cp/class.c:5808
0x1029c4f3 finish_struct_1(tree_node*)
        /home/jwakely/src/gcc/gcc/cp/class.c:6582
0x1029ef53 finish_struct(tree_node*, tree_node*)
        /home/jwakely/src/gcc/gcc/cp/class.c:6888
0x102ebd73 cp_parser_class_specifier_1
        /home/jwakely/src/gcc/gcc/cp/parser.c:19868
0x102ebd73 cp_parser_class_specifier
        /home/jwakely/src/gcc/gcc/cp/parser.c:20096
0x102ebd73 cp_parser_type_specifier
        /home/jwakely/src/gcc/gcc/cp/parser.c:14734
0x10305447 cp_parser_decl_specifier_seq
        /home/jwakely/src/gcc/gcc/cp/parser.c:11965
0x1031d9c7 cp_parser_simple_declaration
        /home/jwakely/src/gcc/gcc/cp/parser.c:11542
0x10315547 cp_parser_block_declaration
        /home/jwakely/src/gcc/gcc/cp/parser.c:11489
0x10322abf cp_parser_declaration
        /home/jwakely/src/gcc/gcc/cp/parser.c:11386
0x10320a5f cp_parser_declaration_seq_opt
        /home/jwakely/src/gcc/gcc/cp/parser.c:11272
0x10320e43 cp_parser_translation_unit
        /home/jwakely/src/gcc/gcc/cp/parser.c:4107
0x10320e43 c_parse_file()
        /home/jwakely/src/gcc/gcc/cp/parser.c:33213
0x104b160b c_common_parse_file()
        /home/jwakely/src/gcc/gcc/c-family/c-opts.c:1067


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/66216] [6 Regression] Defaulted Operators and constructors not working with aligned attribute
  2015-05-20 12:33 [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute npl at chello dot at
  2015-05-20 13:01 ` [Bug c++/66216] [6 Regression] Defaulted Operators and constructors " redi at gcc dot gnu.org
@ 2015-05-20 19:53 ` jamrial at gmail dot com
  2015-06-26 21:31 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jamrial at gmail dot com @ 2015-05-20 19:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216

--- Comment #2 from James Almer <jamrial at gmail dot com> ---
(In reply to Jonathan Wakely from comment #1)
> And now it gives an ICE on trunk, so it's regressed from rejects-valid to
> ice-on-valid-code:
> 
> a.cc:1:7: internal compiler error: canonical types differ for identical
> types const CMymy and const CMymy
>  class CMymy

This may be a duplicate of pr65936 then, or related.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/66216] [6 Regression] Defaulted Operators and constructors not working with aligned attribute
  2015-05-20 12:33 [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute npl at chello dot at
  2015-05-20 13:01 ` [Bug c++/66216] [6 Regression] Defaulted Operators and constructors " redi at gcc dot gnu.org
  2015-05-20 19:53 ` jamrial at gmail dot com
@ 2015-06-26 21:31 ` jason at gcc dot gnu.org
  2015-06-26 21:42 ` jason at gcc dot gnu.org
  2015-06-26 21:42 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-26 21:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 26 21:31:13 2015
New Revision: 225087

URL: https://gcc.gnu.org/viewcvs?rev=225087&root=gcc&view=rev
Log:
        PR c++/66216
        * class.c (finish_struct): Call fixup_attribute_variants.

Added:
    trunk/gcc/testsuite/g++.dg/ext/attrib52.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/66216] [6 Regression] Defaulted Operators and constructors not working with aligned attribute
  2015-05-20 12:33 [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute npl at chello dot at
                   ` (3 preceding siblings ...)
  2015-06-26 21:42 ` jason at gcc dot gnu.org
@ 2015-06-26 21:42 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-26 21:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 26 21:41:34 2015
New Revision: 225088

URL: https://gcc.gnu.org/viewcvs?rev=225088&root=gcc&view=rev
Log:
        PR c++/66216
        * class.c (finish_struct): Call fixup_attribute_variants.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/ext/attrib52.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/class.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/66216] [6 Regression] Defaulted Operators and constructors not working with aligned attribute
  2015-05-20 12:33 [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute npl at chello dot at
                   ` (2 preceding siblings ...)
  2015-06-26 21:31 ` jason at gcc dot gnu.org
@ 2015-06-26 21:42 ` jason at gcc dot gnu.org
  2015-06-26 21:42 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-26 21:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.2

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-26 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 12:33 [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute npl at chello dot at
2015-05-20 13:01 ` [Bug c++/66216] [6 Regression] Defaulted Operators and constructors " redi at gcc dot gnu.org
2015-05-20 19:53 ` jamrial at gmail dot com
2015-06-26 21:31 ` jason at gcc dot gnu.org
2015-06-26 21:42 ` jason at gcc dot gnu.org
2015-06-26 21:42 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).