public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor
@ 2015-06-15 10:18 fordeso2 at gmail dot com
2015-06-15 10:26 ` [Bug c++/66542] [4.9/5/6 Regression] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: fordeso2 at gmail dot com @ 2015-06-15 10:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
Bug ID: 66542
Summary: [C++11] Can create static variable of type that has
deleted destructor
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fordeso2 at gmail dot com
Target Milestone: ---
Created attachment 35782
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35782&action=edit
Preprocessed file with bug
when a class has user-defined (not default) constructor and destructor marked
deleted, gcc allows creating of a static variable of class's type.
Command line: gcc -std=c++11 -lstdc++ ret.cpp
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5-20150519/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=c++98
Thread model: posix
Attached preprocessed file.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/66542] [4.9/5/6 Regression] [C++11] Can create static variable of type that has deleted destructor
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
@ 2015-06-15 10:26 ` redi at gcc dot gnu.org
2015-06-15 17:34 ` daniel.kruegler at googlemail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-06-15 10:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-15
Known to work| |4.8.3
Summary|[C++11] Can create static |[4.9/5/6 Regression]
|variable of type that has |[C++11] Can create static
|deleted destructor |variable of type that has
| |deleted destructor
Ever confirmed|0 |1
Known to fail| |4.9.2, 5.1.0, 6.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/66542] [4.9/5/6 Regression] [C++11] Can create static variable of type that has deleted destructor
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
2015-06-15 10:26 ` [Bug c++/66542] [4.9/5/6 Regression] " redi at gcc dot gnu.org
@ 2015-06-15 17:34 ` daniel.kruegler at googlemail dot com
2015-06-15 20:36 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2015-06-15 17:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
This seems to be a regression versus gcc 4.8.2
>From gcc-bugs-return-489028-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 15 18:08:23 2015
Return-Path: <gcc-bugs-return-489028-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 88814 invoked by alias); 15 Jun 2015 18:08:22 -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 88701 invoked by uid 48); 15 Jun 2015 18:08:13 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/66514] UBSAN: Add -fsanitize=lifetime
Date: Mon, 15 Jun 2015 18:08:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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: cc
Message-ID: <bug-66514-4-hnI7JNrVCo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66514-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66514-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg01360.txt.bz2
Content-length: 785
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66514
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> Ok, after reading your caution and test-cases mentioned in the ASAN tracker,
> I think emitting a poison memory call in a dtor for instances that does not
> use placement new can be beneficial. However, I can't evaluate if getting
> such kind of information in doable in GCC?
We could certainly emit the poison call where we currently have the clobber.
>From gcc-bugs-return-489029-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 15 18:56:07 2015
Return-Path: <gcc-bugs-return-489029-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 97638 invoked by alias); 15 Jun 2015 18:56:07 -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 97606 invoked by uid 48); 15 Jun 2015 18:56:03 -0000
From: "gerhard.steinmetz.fortran@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66544] ICE on function with pointer result in combination with implicit none
Date: Mon, 15 Jun 2015 18:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-66544-4-38KM7NMAIj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66544-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66544-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-06/txt/msg01361.txt.bz2
Content-length: 460
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf544
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Originally not the above z0.f90, but this code was thought as test case :
$ cat z0.f90
module m
contains
function f() result(z)
procedure(f), pointer :: z
end
end module
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize -fimplicit-none -c
z0.f90
But anyway, the result is the same.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/66542] [4.9/5/6 Regression] [C++11] Can create static variable of type that has deleted destructor
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
2015-06-15 10:26 ` [Bug c++/66542] [4.9/5/6 Regression] " redi at gcc dot gnu.org
2015-06-15 17:34 ` daniel.kruegler at googlemail dot com
@ 2015-06-15 20:36 ` redi at gcc dot gnu.org
2015-06-22 18:01 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-06-15 20:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Daniel Krügler from comment #1)
> This seems to be a regression versus gcc 4.8.2
That's why I changed the title to say [4.9/5/6 Regression] :-)
>From gcc-bugs-return-489036-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 15 21:14:22 2015
Return-Path: <gcc-bugs-return-489036-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 67847 invoked by alias); 15 Jun 2015 21:14:21 -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 67799 invoked by uid 48); 15 Jun 2015 21:14:18 -0000
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug jit/66546] New: No way to disable check for unreachable blocks
Date: Mon, 15 Jun 2015 21:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: jit
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dmalcolm at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-66546-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-06/txt/msg01368.txt.bz2
Content-length: 729
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf546
Bug ID: 66546
Summary: No way to disable check for unreachable blocks
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: jit
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
Currently libgccjit always issues a hard error about unconditional blocks.
Some interpreters (e.g. Lua) generate bytecode that may have unreachable
instructions, so it should make it easier for client code if they can have a
way to turn off this check.
See https://gcc.gnu.org/ml/jit/2015-q2/msg00057.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/66542] [4.9/5/6 Regression] [C++11] Can create static variable of type that has deleted destructor
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
` (2 preceding siblings ...)
2015-06-15 20:36 ` redi at gcc dot gnu.org
@ 2015-06-22 18:01 ` jason at gcc dot gnu.org
2015-06-23 14:08 ` jason at gcc dot gnu.org
2015-06-24 20:01 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-22 18:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/66542] [4.9/5/6 Regression] [C++11] Can create static variable of type that has deleted destructor
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
` (3 preceding siblings ...)
2015-06-22 18:01 ` jason at gcc dot gnu.org
@ 2015-06-23 14:08 ` jason at gcc dot gnu.org
2015-06-24 20:01 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-23 14:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jun 23 14:08:19 2015
New Revision: 224842
URL: https://gcc.gnu.org/viewcvs?rev=224842&root=gcc&view=rev
Log:
PR c++/66542
* decl.c (expand_static_init): Make sure the destructor is callable
here even if we have an initializer.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/deleted12.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/66542] [4.9/5/6 Regression] [C++11] Can create static variable of type that has deleted destructor
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
` (4 preceding siblings ...)
2015-06-23 14:08 ` jason at gcc dot gnu.org
@ 2015-06-24 20:01 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-24 20:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66542
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |6.0
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for GCC 6; I tend not to backport fixes for invalid code bugs.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-24 20:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 10:18 [Bug c++/66542] New: [C++11] Can create static variable of type that has deleted destructor fordeso2 at gmail dot com
2015-06-15 10:26 ` [Bug c++/66542] [4.9/5/6 Regression] " redi at gcc dot gnu.org
2015-06-15 17:34 ` daniel.kruegler at googlemail dot com
2015-06-15 20:36 ` redi at gcc dot gnu.org
2015-06-22 18:01 ` jason at gcc dot gnu.org
2015-06-23 14:08 ` jason at gcc dot gnu.org
2015-06-24 20:01 ` 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).