public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
@ 2014-11-01 18:44 ` john.lindgren at aol dot com
  2014-11-01 18:45 ` john.lindgren at aol dot com
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: john.lindgren at aol dot com @ 2014-11-01 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from John Lindgren <john.lindgren at aol dot com> ---
Created attachment 33860
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33860&action=edit
Test case 2


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

* [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor
@ 2014-11-01 18:44 john.lindgren at aol dot com
  2014-11-01 18:44 ` [Bug c++/63707] " john.lindgren at aol dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: john.lindgren at aol dot com @ 2014-11-01 18:44 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3796 bytes --]

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

            Bug ID: 63707
           Summary: Brace initialization of array sometimes fails if no
                    copy constructor
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: john.lindgren at aol dot com

Created attachment 33859
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33859&action=edit
Test case 1

Brace-initializing an array of a class without a public copy constructor gives
an error in some cases but succeeds in others.  After discussing the problem
here [1], I believe this is bug in GCC.

Attached are three test cases:
test1-fails.cc: Initialization of member array of non-literal type (error)
test2-works.cc: Initialization of member array of literal type (compiles)
test3-works.cc: Initialization of static array of non-literal type (compiles)
test4-works.cc: Initialization of single member of non-literal type (compiles)

The error given is:
$ g++ -Wall -Wextra -std=c++11 -c test1-fails.cc 
test1-fails.cc: In constructor ‘Parent::Parent()’:
test1-fails.cc:13:35: error: use of deleted function ‘Child::Child(const
Child&)’
     Parent () : children {{5}, {7}} {}
                                   ^
test1-fails.cc:7:5: note: declared here
     Child (const Child &) = delete;
     ^

$ g++ --version
g++ (GCC) 4.9.1 20140903 (prerelease)

By way of comparison, Clang 3.5.0 compiles all three test cases without errors.

[1]
http://stackoverflow.com/questions/26685551/how-to-initialize-array-of-classes-with-deleted-copy-constructor-c11
>From gcc-bugs-return-465551-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 01 18:45:49 2014
Return-Path: <gcc-bugs-return-465551-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29026 invoked by alias); 1 Nov 2014 18:45:49 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29000 invoked by uid 48); 1 Nov 2014 18:45:46 -0000
From: "john.lindgren at aol dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
Date: Sat, 01 Nov 2014 18:45:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: john.lindgren at aol dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-63707-4-WH5EjhijUj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63707-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63707-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg00023.txt.bz2
Content-length: 230

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc707

--- Comment #3 from John Lindgren <john.lindgren at aol dot com> ---
Created attachment 33862
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3862&actioníit
Test case 4


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
  2014-11-01 18:44 ` [Bug c++/63707] " john.lindgren at aol dot com
@ 2014-11-01 18:45 ` john.lindgren at aol dot com
  2014-11-01 18:49 ` john.lindgren at aol dot com
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: john.lindgren at aol dot com @ 2014-11-01 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from John Lindgren <john.lindgren at aol dot com> ---
Created attachment 33861
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33861&action=edit
Test case 3


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
  2014-11-01 18:44 ` [Bug c++/63707] " john.lindgren at aol dot com
  2014-11-01 18:45 ` john.lindgren at aol dot com
@ 2014-11-01 18:49 ` john.lindgren at aol dot com
  2014-12-12 15:02 ` ville.voutilainen at gmail dot com
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: john.lindgren at aol dot com @ 2014-11-01 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

John Lindgren <john.lindgren at aol dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33860|0                           |1
        is obsolete|                            |

--- Comment #4 from John Lindgren <john.lindgren at aol dot com> ---
Created attachment 33863
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33863&action=edit
Corrected test case 2

Corrected test case 2 (previous was identical to test case 1).


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (2 preceding siblings ...)
  2014-11-01 18:49 ` john.lindgren at aol dot com
@ 2014-12-12 15:02 ` ville.voutilainen at gmail dot com
  2015-01-28 11:52 ` redi at gcc dot gnu.org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-12 15:02 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-12
                 CC|                            |ville.voutilainen at gmail dot com
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.2, 4.9.1, 5.0


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (3 preceding siblings ...)
  2014-12-12 15:02 ` ville.voutilainen at gmail dot com
@ 2015-01-28 11:52 ` redi at gcc dot gnu.org
  2015-01-31 20:34 ` redi at gcc dot gnu.org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-28 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The member array case only fails when the array element has a user-defined
destructor

Here's the failing testcase repeated from the attachment and reduced slightly:

struct Child
{
    Child (int);
    ~Child ();
    Child (const Child &) = delete;
};

struct Parent
{
    Parent () : children {{5}, {7}} {}

    Child children[2];
};


i.cc: In constructor ‘Parent::Parent()’:
i.cc:12:35: error: use of deleted function ‘Child::Child(const Child&)’
     Parent () : children {{5}, {7}} {}
                                   ^
i.cc:6:5: note: declared here
     Child (const Child &) = delete;
     ^

Commenting out the destructor declaration allows it to compile.
>From gcc-bugs-return-475225-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 28 11:53:59 2015
Return-Path: <gcc-bugs-return-475225-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26770 invoked by alias); 28 Jan 2015 11:53:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26538 invoked by uid 48); 28 Jan 2015 11:53:54 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/64829] [ARM] ICE at -O3 in vect_get_vec_def_for_stmt_copy
Date: Wed, 28 Jan 2015 11:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-64829-4-mDMFpWyh8Y@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64829-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64829-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg03219.txt.bz2
Content-length: 332

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd829

--- Comment #4 from ktkachov at gcc dot gnu.org ---

>
> are you sure it isn't already fixed?

Don't think so. It ICEs for me with r220203.
I'm using the options -mfpu=neon -mfloat-abi=hard  -O3 -march=armv7-a.
The -mfloat-abi=hard is important, it doesn't reproduce without it


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (4 preceding siblings ...)
  2015-01-28 11:52 ` redi at gcc dot gnu.org
@ 2015-01-31 20:34 ` redi at gcc dot gnu.org
  2015-01-31 20:35 ` redi at gcc dot gnu.org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-31 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cth027 at yahoo dot de

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 64887 has been marked as a duplicate of this bug. ***


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (5 preceding siblings ...)
  2015-01-31 20:34 ` redi at gcc dot gnu.org
@ 2015-01-31 20:35 ` redi at gcc dot gnu.org
  2020-12-06 19:59 ` eyalroz at technion dot ac.il
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-31 20:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced from PR 64887:

struct string
{
  string(const char*) { }
  ~string(); // make this type non-trivial
};

struct A
{
  string s;
  A() = delete;
  A(const A&) = delete;
  A(A&&) = delete;
  A(const char*);
};

A arr[2] = {{"a"}, {"b"}}; // ok

struct Aggr {
  A arr[2];
  Aggr() : arr{{"a"}, {"b"}} {} // error
};

The member of non-trivial type is required to trigger the error, presumably
because it makes the destructor non-trivial.


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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (6 preceding siblings ...)
  2015-01-31 20:35 ` redi at gcc dot gnu.org
@ 2020-12-06 19:59 ` eyalroz at technion dot ac.il
  2020-12-10 19:17 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eyalroz at technion dot ac.il @ 2020-12-06 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

Eyal Rozenberg <eyalroz at technion dot ac.il> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eyalroz at technion dot ac.il

--- Comment #12 from Eyal Rozenberg <eyalroz at technion dot ac.il> ---
Rejection valid code, especially valid code which is not contrived and can well
occur in people's real-life work, seems like a high-priority bug.

The last substantive comment here, other than dupe-marking-related comments two
years ago, is comment #8, asking for this to be fixed - four and a half years
ago.

Jonathan and others - please try to prioritize fixing this, and even if you
can't for some reason - at least explain which this can't be fixed promptly.

See also:

https://stackoverflow.com/q/65138048/1593077

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (7 preceding siblings ...)
  2020-12-06 19:59 ` eyalroz at technion dot ac.il
@ 2020-12-10 19:17 ` jakub at gcc dot gnu.org
  2021-01-12 23:35 ` pdimov at gmail dot com
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-10 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
At least for #c5 the important difference between that testcase and // ~Child
();
which is accepted is I think since
r0-113052-ge2df21bfc6c81b4bc410a42002c8427454ffa628
in the cp/init.c (perform_member_init) code:
888           /* A FIELD_DECL doesn't really have a suitable lifetime, but
889              make_temporary_var_for_ref_to_temp will treat it as automatic
and
890              set_up_extended_ref_temp wants to use the decl in a warning. 
*/
891           init = extend_ref_init_temps (member, init, &cleanups);
892           if (TREE_CODE (type) == ARRAY_TYPE
893               && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (type)))
894             init = build_vec_init_expr (type, init, tf_warning_or_error);
If it has trivial destructor, nothing calls build_vec_init_expr and the copy
ctor isn't needed, but when it is called, it is needed.
I think in this case extend_ref_init_temps doesn't do anything at all, so it is
unclear if build_vec_init_expr is needed too or not.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (8 preceding siblings ...)
  2020-12-10 19:17 ` jakub at gcc dot gnu.org
@ 2021-01-12 23:35 ` pdimov at gmail dot com
  2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pdimov at gmail dot com @ 2021-01-12 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Dimov <pdimov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pdimov at gmail dot com

--- Comment #14 from Peter Dimov <pdimov at gmail dot com> ---
FWIW, I just hit this problem as well when trying to make changes to
Boost.Variant2. My reduced test case is https://godbolt.org/z/zG6ddP; I was
going to submit that as a bug but found this one.

I support the petition to have this fixed.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (9 preceding siblings ...)
  2021-01-12 23:35 ` pdimov at gmail dot com
@ 2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
  2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-13  1:32 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #15 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looking.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (10 preceding siblings ...)
  2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
@ 2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
  2021-01-14 20:36 ` jason at gcc dot gnu.org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-13  1:32 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (11 preceding siblings ...)
  2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
@ 2021-01-14 20:36 ` jason at gcc dot gnu.org
  2021-01-15 18:39 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jason at gcc dot gnu.org @ 2021-01-14 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|mpolacek at gcc dot gnu.org        |jason at gcc dot gnu.org
                 CC|                            |jason at gcc dot gnu.org

--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> ---
Mine.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (12 preceding siblings ...)
  2021-01-14 20:36 ` jason at gcc dot gnu.org
@ 2021-01-15 18:39 ` cvs-commit at gcc dot gnu.org
  2021-01-15 18:57 ` jason at gcc dot gnu.org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-15 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:cd09079cfd50d289cbb05eadb728a0713f6bae8a

commit r11-6733-gcd09079cfd50d289cbb05eadb728a0713f6bae8a
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Jan 15 11:42:00 2021 -0500

    c++: Fix list-init of array of no-copy type [PR63707]

    build_vec_init_elt models initialization from some arbitrary object of the
    type, i.e. copy, but in the case of list-initialization we don't do a copy
    from the elements, we initialize them directly.

    gcc/cp/ChangeLog:

            PR c++/63707
            * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
            if we got a CONSTRUCTOR.

    gcc/testsuite/ChangeLog:

            PR c++/63707
            * g++.dg/cpp0x/initlist-array13.C: New test.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (13 preceding siblings ...)
  2021-01-15 18:39 ` cvs-commit at gcc dot gnu.org
@ 2021-01-15 18:57 ` jason at gcc dot gnu.org
  2021-01-29 16:00 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jason at gcc dot gnu.org @ 2021-01-15 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.0
      Known to fail|11.0                        |

--- Comment #18 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for GCC 11 so far.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (14 preceding siblings ...)
  2021-01-15 18:57 ` jason at gcc dot gnu.org
@ 2021-01-29 16:00 ` cvs-commit at gcc dot gnu.org
  2021-01-29 16:23 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-29 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:81fd2df5911c4b2c31960fa5ef1407d20f1ca50c

commit r10-9311-g81fd2df5911c4b2c31960fa5ef1407d20f1ca50c
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Jan 15 11:42:00 2021 -0500

    c++: Fix list-init of array of no-copy type [PR63707]

    build_vec_init_elt models initialization from some arbitrary object of the
    type, i.e. copy, but in the case of list-initialization we don't do a copy
    from the elements, we initialize them directly.

    gcc/cp/ChangeLog:

            PR c++/63707
            * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
            if we got a CONSTRUCTOR.

    gcc/testsuite/ChangeLog:

            PR c++/63707
            * g++.dg/cpp0x/initlist-array13.C: New test.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (15 preceding siblings ...)
  2021-01-29 16:00 ` cvs-commit at gcc dot gnu.org
@ 2021-01-29 16:23 ` cvs-commit at gcc dot gnu.org
  2021-01-29 18:18 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-29 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:ca02f0a0eb0fbeb3c1e01c3a55a95b0690ecfabc

commit r9-9212-gca02f0a0eb0fbeb3c1e01c3a55a95b0690ecfabc
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Jan 15 11:42:00 2021 -0500

    c++: Fix list-init of array of no-copy type [PR63707]

    build_vec_init_elt models initialization from some arbitrary object of the
    type, i.e. copy, but in the case of list-initialization we don't do a copy
    from the elements, we initialize them directly.

    gcc/cp/ChangeLog:

            PR c++/63707
            * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
            if we got a CONSTRUCTOR.

    gcc/testsuite/ChangeLog:

            PR c++/63707
            * g++.dg/cpp0x/initlist-array13.C: New test.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (16 preceding siblings ...)
  2021-01-29 16:23 ` cvs-commit at gcc dot gnu.org
@ 2021-01-29 18:18 ` jason at gcc dot gnu.org
  2021-01-29 19:31 ` eyalroz1 at gmx dot com
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jason at gcc dot gnu.org @ 2021-01-29 18:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |9.4

--- Comment #21 from Jason Merrill <jason at gcc dot gnu.org> ---
Also fixed for 9.4 and 10.3.

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (17 preceding siblings ...)
  2021-01-29 18:18 ` jason at gcc dot gnu.org
@ 2021-01-29 19:31 ` eyalroz1 at gmx dot com
  2021-08-13  8:32 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: eyalroz1 at gmx dot com @ 2021-01-29 19:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Eyal Rozenberg <eyalroz1 at gmx dot com> ---
Thank you, Jason and others, for your attentiveness to interest in the bug and
prioritizing its fix. (Now if you could just fix all the other bugs I'm
interested in... :-P)

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (18 preceding siblings ...)
  2021-01-29 19:31 ` eyalroz1 at gmx dot com
@ 2021-08-13  8:32 ` pinskia at gcc dot gnu.org
  2021-12-09  7:35 ` pinskia at gcc dot gnu.org
  2022-08-31 12:28 ` marxin at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-13  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard-gccbugzilla@metafoo
                   |                            |.co.uk

--- Comment #23 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 68709 has been marked as a duplicate of this bug. ***

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (19 preceding siblings ...)
  2021-08-13  8:32 ` pinskia at gcc dot gnu.org
@ 2021-12-09  7:35 ` pinskia at gcc dot gnu.org
  2022-08-31 12:28 ` marxin at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-09  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |l2m at ukr dot net

--- Comment #24 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 91499 has been marked as a duplicate of this bug. ***

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

* [Bug c++/63707] Brace initialization of array sometimes fails if no copy constructor
  2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
                   ` (20 preceding siblings ...)
  2021-12-09  7:35 ` pinskia at gcc dot gnu.org
@ 2022-08-31 12:28 ` marxin at gcc dot gnu.org
  21 siblings, 0 replies; 23+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-08-31 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jlame646 at gmail dot com

--- Comment #25 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 106788 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2022-08-31 12:28 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-01 18:44 [Bug c++/63707] New: Brace initialization of array sometimes fails if no copy constructor john.lindgren at aol dot com
2014-11-01 18:44 ` [Bug c++/63707] " john.lindgren at aol dot com
2014-11-01 18:45 ` john.lindgren at aol dot com
2014-11-01 18:49 ` john.lindgren at aol dot com
2014-12-12 15:02 ` ville.voutilainen at gmail dot com
2015-01-28 11:52 ` redi at gcc dot gnu.org
2015-01-31 20:34 ` redi at gcc dot gnu.org
2015-01-31 20:35 ` redi at gcc dot gnu.org
2020-12-06 19:59 ` eyalroz at technion dot ac.il
2020-12-10 19:17 ` jakub at gcc dot gnu.org
2021-01-12 23:35 ` pdimov at gmail dot com
2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
2021-01-13  1:32 ` mpolacek at gcc dot gnu.org
2021-01-14 20:36 ` jason at gcc dot gnu.org
2021-01-15 18:39 ` cvs-commit at gcc dot gnu.org
2021-01-15 18:57 ` jason at gcc dot gnu.org
2021-01-29 16:00 ` cvs-commit at gcc dot gnu.org
2021-01-29 16:23 ` cvs-commit at gcc dot gnu.org
2021-01-29 18:18 ` jason at gcc dot gnu.org
2021-01-29 19:31 ` eyalroz1 at gmx dot com
2021-08-13  8:32 ` pinskia at gcc dot gnu.org
2021-12-09  7:35 ` pinskia at gcc dot gnu.org
2022-08-31 12:28 ` marxin 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).