public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors)
@ 2012-02-12 13:23 dominiq at lps dot ens.fr
2012-02-12 13:57 ` [Bug libstdc++/52215] " redi at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-02-12 13:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Bug #: 52215
Summary: [4.7 Regression] FAIL:
ext/profile/mutex_extensions_neg.cc (test for excess
errors)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dominiq@lps.ens.fr
CC: bkoz@redhat.com, jwakely.gcc@gmail.com
Between revisions 184107 (OK) and 184111 (see
http://gcc.gnu.org/ml/gcc-regression/2012-02/msg00033.html and
http://gcc.gnu.org/ml/gcc-regression/2012-02/msg00035.html , likely r184110),
the test ext/profile/mutex_extensions_neg.cc has started to fail with -m32. The
error is
FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors)
Excess errors:
/opt/gcc/build_w/x86_64-apple-darwin10.8.0/i386/libstdc++-v3/include/profile/impl/profiler_state.h:52:28:
error: conversion from 'enum __gnu_profile::__state_type*' to 'enum
__gnu_profile::__state_type' [-fpermissive]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/52215] [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors)
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
@ 2012-02-12 13:57 ` redi at gcc dot gnu.org
2012-02-12 14:14 ` [Bug c++/52215] " redi at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-12 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-12 13:57:32 UTC ---
It makes no sense unless the signature of __atomic_compare_exchange_n is
different when -m32 is used!
Looking into it ...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors)
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
2012-02-12 13:57 ` [Bug libstdc++/52215] " redi at gcc dot gnu.org
@ 2012-02-12 14:14 ` redi at gcc dot gnu.org
2012-02-12 14:24 ` [Bug c++/52215] __atomic_compare_exchange_n for enumeration type changes signature with -m32 redi at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-12 14:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-12
CC| |amacleod at redhat dot com
Component|libstdc++ |c++
Ever Confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-12 14:13:38 UTC ---
Confirmed, this works with -m64 but fails with -m32
enum E { EE };
int main()
{
E e = EE;
__atomic_compare_exchange_n(&e, &e, e, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED);
}
cas.cc:6:82: error: conversion from ‘enum E*’ to ‘enum E’ [-fpermissive]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
2012-02-12 13:57 ` [Bug libstdc++/52215] " redi at gcc dot gnu.org
2012-02-12 14:14 ` [Bug c++/52215] " redi at gcc dot gnu.org
@ 2012-02-12 14:24 ` redi at gcc dot gnu.org
2012-02-12 20:49 ` hp at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-12 14:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
CC|jwakely.gcc at gmail dot |redi at gcc dot gnu.org
|com |
Summary|[4.7 Regression] FAIL: |__atomic_compare_exchange_n
|ext/profile/mutex_extension |for enumeration type
|s_neg.cc (test for excess |changes signature with -m32
|errors) |
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-12 14:23:54 UTC ---
It's the second parameter which has the wrong type, this works with -m32:
__atomic_compare_exchange_n(&e, e, e, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED);
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2012-02-12 14:24 ` [Bug c++/52215] __atomic_compare_exchange_n for enumeration type changes signature with -m32 redi at gcc dot gnu.org
@ 2012-02-12 20:49 ` hp at gcc dot gnu.org
2012-02-13 11:30 ` [Bug c++/52215] [4.7 Regression] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu.org @ 2012-02-12 20:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hp at gcc dot gnu.org
--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-02-12 20:48:25 UTC ---
Presumably universal for ilp32 machines, at least for cris-elf too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] [4.7 Regression] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2012-02-12 20:49 ` hp at gcc dot gnu.org
@ 2012-02-13 11:30 ` rguenth at gcc dot gnu.org
2012-02-13 14:00 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-13 11:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu.org
Target Milestone|--- |4.7.0
Summary|__atomic_compare_exchange_n |[4.7 Regression]
|for enumeration type |__atomic_compare_exchange_n
|changes signature with -m32 |for enumeration type
| |changes signature with -m32
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-13 11:28:04 UTC ---
DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_N,
"__atomic_compare_exchange_n",
BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST)
thus it is a variadic function. But sync_resolve_params () does
/* Only convert parameters if the size is appropriate with new format
sync routines. */
if (orig_format
|| tree_int_cst_equal (TYPE_SIZE (ptype), TYPE_SIZE (arg_type)))
{
/* Ideally for the first conversion we'd use convert_for_assignment
so that we get warnings for anything that doesn't match the
pointer
type. This isn't portable across the C and C++ front ends atm.
*/
val = VEC_index (tree, params, parmnum);
val = convert (ptype, val);
val = convert (arg_type, val);
VEC_replace (tree, params, parmnum, val);
where we probably should convert to an integer type of the same size as
arg_type first, before converting to a pointer?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] [4.7 Regression] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2012-02-13 11:30 ` [Bug c++/52215] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2012-02-13 14:00 ` jakub at gcc dot gnu.org
2012-02-13 15:28 ` amacleod at redhat dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-13 14:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-13 13:59:41 UTC ---
Created attachment 26650
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26650
gcc47-pr52215.patch
Untested fix. I think it is wrong to decide this based on TYPE_SIZE,
we want to IMHO convert just the I[1248] and I16 arg_types, but not the PTR,
BOOL or INT ones (i.e. arguments in which have the overloaded types, not the
arguments that hold pointers to them or have invariant types).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] [4.7 Regression] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
` (5 preceding siblings ...)
2012-02-13 14:00 ` jakub at gcc dot gnu.org
@ 2012-02-13 15:28 ` amacleod at redhat dot com
2012-02-13 20:14 ` jakub at gcc dot gnu.org
2012-02-13 20:16 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2012-02-13 15:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
--- Comment #7 from Andrew Macleod <amacleod at redhat dot com> 2012-02-13 15:27:04 UTC ---
I think that is better.. its is just the I{1,2,4,8,16} we care about.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] [4.7 Regression] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
` (6 preceding siblings ...)
2012-02-13 15:28 ` amacleod at redhat dot com
@ 2012-02-13 20:14 ` jakub at gcc dot gnu.org
2012-02-13 20:16 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-13 20:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-13 20:13:02 UTC ---
Author: jakub
Date: Mon Feb 13 20:12:54 2012
New Revision: 184167
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184167
Log:
PR c++/52215
* c-common.c (sync_resolve_params): Don't decide whether to convert
or not based on TYPE_SIZE comparison, convert whenever arg_type
is unsigned INTEGER_TYPE.
* g++.dg/ext/atomic-1.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/ext/atomic-1.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/52215] [4.7 Regression] __atomic_compare_exchange_n for enumeration type changes signature with -m32
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
` (7 preceding siblings ...)
2012-02-13 20:14 ` jakub at gcc dot gnu.org
@ 2012-02-13 20:16 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-13 20:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52215
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-13 20:15:53 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-02-13 20:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-12 13:23 [Bug libstdc++/52215] New: [4.7 Regression] FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) dominiq at lps dot ens.fr
2012-02-12 13:57 ` [Bug libstdc++/52215] " redi at gcc dot gnu.org
2012-02-12 14:14 ` [Bug c++/52215] " redi at gcc dot gnu.org
2012-02-12 14:24 ` [Bug c++/52215] __atomic_compare_exchange_n for enumeration type changes signature with -m32 redi at gcc dot gnu.org
2012-02-12 20:49 ` hp at gcc dot gnu.org
2012-02-13 11:30 ` [Bug c++/52215] [4.7 Regression] " rguenth at gcc dot gnu.org
2012-02-13 14:00 ` jakub at gcc dot gnu.org
2012-02-13 15:28 ` amacleod at redhat dot com
2012-02-13 20:14 ` jakub at gcc dot gnu.org
2012-02-13 20:16 ` jakub 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).