public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59244] New: [c++11] can't specialize template on ref-qualified member function pointer type
@ 2013-11-22 5:41 eric.niebler at gmail dot com
2013-11-23 22:19 ` [Bug c++/59244] " daniel.kruegler at googlemail dot com
2014-11-26 16:20 ` paolo.carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: eric.niebler at gmail dot com @ 2013-11-22 5:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59244
Bug ID: 59244
Summary: [c++11] can't specialize template on ref-qualified
member function pointer type
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
I believe the following should compile:
```
template<typename T>
struct U;
template<typename S, typename T>
struct U<S (T::*)()>
{};
template<typename S, typename T>
struct U<S (T::*)() &>
{};
template<typename S, typename T>
struct U<S (T::*)() &&>
{};
```
g++ 4.8.1 in C++11 mode gives this:
```
test.cpp:9:8: error: redefinition of ‘struct U<S (T::*)()>’
struct U<S (T::*)() &>
^
test.cpp:5:8: error: previous definition of ‘struct U<S (T::*)()>’
struct U<S (T::*)()>
^
test.cpp:13:8: error: redefinition of ‘struct U<S (T::*)()>’
struct U<S (T::*)() &&>
^
test.cpp:5:8: error: previous definition of ‘struct U<S (T::*)()>’
struct U<S (T::*)()>
^
```
>From gcc-bugs-return-435474-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 22 06:53:31 2013
Return-Path: <gcc-bugs-return-435474-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23945 invoked by alias); 22 Nov 2013 06:53:30 -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 23922 invoked by uid 48); 22 Nov 2013 06:53:25 -0000
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59245] New: ICE on valid code at -O3 on x86_64-linux-gnu in set_value_range, at tree-vrp.c:443
Date: Fri, 22 Nov 2013 06:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: su at cs dot ucdavis.edu
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-59245-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: 2013-11/txt/msg02251.txt.bz2
Content-length: 2611
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59245
Bug ID: 59245
Summary: ICE on valid code at -O3 on x86_64-linux-gnu in
set_value_range, at tree-vrp.c:443
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
The following code causes an ICE when compiled with the current gcc trunk at
-O3 on x86_64-linux-gnu (in both 32-bit and 64-bit modes).
This is a regression from 4.8.x.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.9.0 20131121 (experimental) [trunk revision 205234] (GCC)
$
$ gcc-trunk -O2 -c small.c
$ gcc-4.8.2 -O3 -c small.c
$
$ gcc-trunk -O3 -c small.c
small.c: In function ‘fn2’:
small.c:18:1: internal compiler error: in set_value_range, at tree-vrp.c:443
fn2 ()
^
0xba89bc set_value_range
../../gcc-trunk/gcc/tree-vrp.c:443
0xbb913a extract_range_from_assert
../../gcc-trunk/gcc/tree-vrp.c:1749
0xbb913a extract_range_from_assignment
../../gcc-trunk/gcc/tree-vrp.c:3772
0xbba671 vrp_visit_assignment_or_call
../../gcc-trunk/gcc/tree-vrp.c:6742
0xbba671 vrp_visit_stmt
../../gcc-trunk/gcc/tree-vrp.c:7553
0xb00612 simulate_stmt
../../gcc-trunk/gcc/tree-ssa-propagate.c:324
0xb00bfd simulate_block
../../gcc-trunk/gcc/tree-ssa-propagate.c:447
0xb00bfd ssa_propagate(ssa_prop_result (*)(gimple_statement_base*, edge_def**,
tree_node**), ssa_prop_result (*)(gimple_statement_base*))
../../gcc-trunk/gcc/tree-ssa-propagate.c:854
0xbbb66b execute_vrp
../../gcc-trunk/gcc/tree-vrp.c:9710
0xbbb66b execute
../../gcc-trunk/gcc/tree-vrp.c:9801
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
----------------------------------------
int a, b, c, e, g;
char d[5], f;
int
fn1 ()
{
if (b)
{
g = 0;
return 0;
}
for (f = 0; f != 1; f--)
;
return 0;
}
void
fn2 ()
{
d[4] = -1;
for (a = 4; a; a--)
{
fn1 ();
e = c < -2147483647 - 1 - d[a] ? c : 0;
}
}
>From gcc-bugs-return-435475-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 22 06:55:04 2013
Return-Path: <gcc-bugs-return-435475-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25522 invoked by alias); 22 Nov 2013 06:55:04 -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 25122 invoked by uid 48); 22 Nov 2013 06:55:00 -0000
From: "boostcpp at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59246] New: GCC should issue runtime error for calling pure virtual function with definition
Date: Fri, 22 Nov 2013 06:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: boostcpp at gmail 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-59246-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: 2013-11/txt/msg02252.txt.bz2
Content-length: 1061
http://gcc.gnu.org/bugzilla/show_bug.cgi?idY246
Bug ID: 59246
Summary: GCC should issue runtime error for calling pure
virtual function with definition
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: boostcpp at gmail dot com
Consider the following code:
struct Base
{
virtual void f() = 0 ;
virtual ~Base() ;
} ;
// pure virtual function with definition
void Base::f() { }
Base::~Base()
{
// call by unqualified name is virtual function call.
// virtual function call during destruction is undefined.
f() ;
}
GCC does not issue runtime abort for a virtual function that also has
definition.
According to the standard(10.4 paragraph 6), this is undefined.
Since this is undefined, GCC can do anything.
But I think GCC should issue runtime abort if it is technically possible.
Clang issues runtime abort for this code.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/59244] [c++11] can't specialize template on ref-qualified member function pointer type
2013-11-22 5:41 [Bug c++/59244] New: [c++11] can't specialize template on ref-qualified member function pointer type eric.niebler at gmail dot com
@ 2013-11-23 22:19 ` daniel.kruegler at googlemail dot com
2014-11-26 16:20 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-11-23 22:19 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: 2446 bytes --]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59244
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
This seems to be fixed in gcc 4.8.2 and in gcc 4.9.0 HEAD
>From gcc-bugs-return-435662-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 23 22:30:02 2013
Return-Path: <gcc-bugs-return-435662-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9580 invoked by alias); 23 Nov 2013 22:30:01 -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 9496 invoked by uid 48); 23 Nov 2013 22:29:58 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/59258] usan: ICE(segfault): stack-buffer-overflow with -fsanitize=undefined
Date: Sat, 23 Nov 2013 22:30: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: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59258-4-Y39s68W2HR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59258-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59258-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: 2013-11/txt/msg02439.txt.bz2
Content-length: 435
http://gcc.gnu.org/bugzilla/show_bug.cgi?idY258
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #4)
> Except for staring at the -fsanitize=null code, I don't have any good idea
> how to debug this - valgrind and an -fsanitizeddress instrumented GCC
> don't help.
Seems like we're passing bogus location. Can you e-mail me the unreduced
testcase? I'll look into it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/59244] [c++11] can't specialize template on ref-qualified member function pointer type
2013-11-22 5:41 [Bug c++/59244] New: [c++11] can't specialize template on ref-qualified member function pointer type eric.niebler at gmail dot com
2013-11-23 22:19 ` [Bug c++/59244] " daniel.kruegler at googlemail dot com
@ 2014-11-26 16:20 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-11-26 16:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59244
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to work| |4.8.2, 4.9.0, 5.0
Resolution|--- |FIXED
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed long time ago.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-26 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22 5:41 [Bug c++/59244] New: [c++11] can't specialize template on ref-qualified member function pointer type eric.niebler at gmail dot com
2013-11-23 22:19 ` [Bug c++/59244] " daniel.kruegler at googlemail dot com
2014-11-26 16:20 ` paolo.carlini at oracle dot com
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).