public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
@ 2013-06-07 0:23 hp at gcc dot gnu.org
2013-06-07 9:46 ` [Bug regression/57551] " hubicka at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: hp at gcc dot gnu.org @ 2013-06-07 0:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
Bug ID: 57551
Summary: [4.9 Regression]: g++.dg/ext/visibility/anon6.C
scan-assembler 1BIiE1cE
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
Assignee: unassigned at gcc dot gnu.org
Reporter: hp at gcc dot gnu.org
CC: hubicka at ucw dot cz
With revision 199692 this test passed.
>From revision 199702 and on, this test has failed as follows:
Running /tmp/hpautotest-gcc0/gcc/gcc/testsuite/g++.dg/dg.exp ...
...
FAIL: g++.dg/ext/visibility/anon6.C -std=c++98 scan-assembler 1BIiE1cE
FAIL: g++.dg/ext/visibility/anon6.C -std=c++11 scan-assembler 1BIiE1cE
With the message in the logfile being:
Executing on host:
/tmp/hpautotest-gcc0/cris-elf/gccobj/gcc/testsuite/g++/../../xg++
-B/tmp/hpautotest-gcc0/cris-elf/gccobj/gcc/testsuite/g++/../../
/tmp/hpautotest-gcc0/gcc/gcc/testsuite/g++.dg/ext/visibility/anon6.C
-fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++
-I/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cris-elf
-I/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include
-I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/libsupc++
-I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/include/backward
-I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/testsuite/util -fmessage-length=0
-std=c++98 -pedantic-errors -Wno-long-long -ffat-lto-objects -ffat-lto-objects
-ffat-lto-objects -S -isystem
/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/./newlib/targ-include -isystem
/tmp/hpautotest-gcc0/gcc/newlib/libc/include -o anon6.s (timeout = 300)
PASS: g++.dg/ext/visibility/anon6.C -std=c++98 (test for excess errors)
FAIL: g++.dg/ext/visibility/anon6.C -std=c++98 scan-assembler 1BIiE1cE
PASS: g++.dg/ext/visibility/anon6.C -std=c++98 scan-assembler-not
globl.*1BIiE1cE
PASS: g++.dg/ext/visibility/anon6.C -std=c++98 scan-assembler-not 1CIiE1cE
(similarly for -std=c++11)
The generated assembly file is empty.
Messages on gcc-patches indicate that the failure is universal; at a glance it
seems the suspect commit 199695 made the whole code go away as unused and
unreachable. Tweak or remove test-case?
Author of suspect patch in revision range CC:ed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
@ 2013-06-07 9:46 ` hubicka at gcc dot gnu.org
2013-06-07 12:50 ` hubicka at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-06-07 9:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-06-07
CC| |hubicka at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
mine.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
2013-06-07 9:46 ` [Bug regression/57551] " hubicka at gcc dot gnu.org
@ 2013-06-07 12:50 ` hubicka at gcc dot gnu.org
2013-06-07 13:52 ` jason at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-06-07 12:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
You are right, I added attribute used to the variable and forgot about it. The
testcase is bogus by expecting unused local static to not be optmized away.
Looking closer, I am however confused. While the attribute fixes the testcase,
i think something wrong is still going on hre.
We get the following symbol out of FE:
_ZN12_GLOBAL__N_11BIiE1cE/1 (const int {anonymous}::B<int>::c) @0x7ffff75141a0
Type: variable definition analyzed
Visibility: force_output comdat
Aux: @0x1 References:
Referring:
Availability: not-ready
Varpool flags: initialized read-only const-value-known
i.e. it is COMDAT but not public. It is the force_output flag that keeps
variable alive and that is there because of keying. The variable is output as
static object:
jh@gcc10:~/trunk/build3/gcc$ more anon6.s
.file "anon6.C"
.section .rodata
.align 4
.type _ZN12_GLOBAL__N_11BIiE1cE, @object
.size _ZN12_GLOBAL__N_11BIiE1cE, 4
_ZN12_GLOBAL__N_11BIiE1cE:
.zero 4
.ident "GCC: (GNU) 4.9.0 20130602 (experimental)"
.section .note.GNU-stack,"",@progbits
i.e. no comdat visibility. This flag stays through the compilation and seems to
be ignored by output routines.
And now adding the attribute used:
Index: /home/jh/trunk/gcc/testsuite/g++.dg/ext/visibility/anon6.C
===================================================================
--- /home/jh/trunk/gcc/testsuite/g++.dg/ext/visibility/anon6.C (revision
199698)
+++ /home/jh/trunk/gcc/testsuite/g++.dg/ext/visibility/anon6.C (working copy)
@@ -18,7 +18,7 @@ namespace
template <typename T>
class B
{
- static const T c = 0;
+ __attribute__ ((__used__)) static const T c = 0;
};
template <typename T> const T B<T>::c;
changes object to:
_ZN12_GLOBAL__N_11BIiE1cE/1 (const int {anonymous}::B<int>::c) @0x7ffff75141a0
Type: variable definition analyzed
Visibility: force_output forced_by_abi public weak comdat
comdat_group:_ZN12_GLOBAL__N_11BIiE1cE one_only
Aux: @0x7ffff7402850 References:
Referring:
Availability: not-ready
Varpool flags: initialized read-only const-value-known
which changes assembly to:
jh@gcc10:~/trunk/build/gcc$ ./xgcc -B ./ -O2
/home/jh/trunk/gcc/testsuite/g++.dg/ext/visibility/anon6.C -S -std=c++98
-pedantic-errors -Wno-long-long -S -fdump-ipa-all-details -fdump-ipa-cgraph
jh@gcc10:~/trunk/build/gcc$ more anon6.s
.file "anon6.C"
.weak _ZN12_GLOBAL__N_11BIiE1cE
.section
.rodata._ZN12_GLOBAL__N_11BIiE1cE,"aG",@progbits,_ZN12_GLOBAL__N_11BIiE1cE,comdat
.align 4
.type _ZN12_GLOBAL__N_11BIiE1cE, @gnu_unique_object
.size _ZN12_GLOBAL__N_11BIiE1cE, 4
_ZN12_GLOBAL__N_11BIiE1cE:
.zero 4
.ident "GCC: (GNU) 4.9.0 20130605 (experimental)"
.section .note.GNU-stack,"",@progbits
Here we now disagree with GCC 4.5 that still outputs this as static.
Jason, why C++ FE behaves this way now?
clang also optimizes out the variable in testcase and adding attribute used
makes the var to be static.
I think the testcase should be fixed by adding the used flag and by checking
that weaks/comdats are not involved in the assembly and C++ FE should be fixed.
or do I miss something?
Honza
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
2013-06-07 9:46 ` [Bug regression/57551] " hubicka at gcc dot gnu.org
2013-06-07 12:50 ` hubicka at gcc dot gnu.org
@ 2013-06-07 13:52 ` jason at gcc dot gnu.org
2013-06-07 14:54 ` hubicka at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2013-06-07 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Assignee|hubicka at gcc dot gnu.org |jason at gcc dot gnu.org
Target Milestone|--- |4.9.0
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Sounds right to me.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (2 preceding siblings ...)
2013-06-07 13:52 ` jason at gcc dot gnu.org
@ 2013-06-07 14:54 ` hubicka at gcc dot gnu.org
2013-06-11 7:57 ` hubicka at ucw dot cz
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-06-07 14:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, C++ FE properly brings the decl local as part of constrain_visibility,
however later in pt.c it is made public again in
mark_decl_instantiated as explicit instantiation.
My wild try is the following:
Index: pt.c
===================================================================
--- pt.c (revision 199698)
+++ pt.c (working copy)
@@ -17402,6 +17402,13 @@ mark_decl_instantiated (tree result, int
if (TREE_ASM_WRITTEN (result))
return;
+ /* For anonymous namespace we don't need to do anything. */
+ if (decl_anon_ns_mem_p (result))
+ {
+ gcc_assert (!TREE_PUBLIC (result));
+ return;
+ }
+
if (TREE_CODE (result) != FUNCTION_DECL)
/* The TREE_PUBLIC flag for function declarations will have been
set correctly by tsubst. */
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (3 preceding siblings ...)
2013-06-07 14:54 ` hubicka at gcc dot gnu.org
@ 2013-06-11 7:57 ` hubicka at ucw dot cz
2013-06-11 14:17 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at ucw dot cz @ 2013-06-11 7:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
--- Comment #6 from Jan Hubicka <hubicka at ucw dot cz> ---
Good to be assigned. I posted the patch
Jason, can you please look at
http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00433.html
Honza
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (4 preceding siblings ...)
2013-06-11 7:57 ` hubicka at ucw dot cz
@ 2013-06-11 14:17 ` jason at gcc dot gnu.org
2013-06-12 0:15 ` hp at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2013-06-11 14:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #6)
> Jason, can you please look at
> http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00433.html
I approved it the same day you posted it. :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (5 preceding siblings ...)
2013-06-11 14:17 ` jason at gcc dot gnu.org
@ 2013-06-12 0:15 ` hp at gcc dot gnu.org
2013-06-12 12:12 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hp at gcc dot gnu.org @ 2013-06-12 0:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
Intended fix committed as noticed by my autotester, so I'm closing this.
Looks like the svn commit <-> bugzilla interface is broken or severely delayed;
the log seems ok and should match, AFAICT:
Log:
PR c++/57551
* g++.dg/ext/visibility/anon6.C: Update testcase.
* cp/pt.c (mark_decl_instantiated): Do not export explicit
instantiations
of anonymous namespace templates.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (6 preceding siblings ...)
2013-06-12 0:15 ` hp at gcc dot gnu.org
@ 2013-06-12 12:12 ` paolo.carlini at oracle dot com
2013-06-12 21:31 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-12 12:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> ---
It's broken since the Bugzilla update, unfortunately.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (7 preceding siblings ...)
2013-06-12 12:12 ` paolo.carlini at oracle dot com
@ 2013-06-12 21:31 ` pinskia at gcc dot gnu.org
2013-06-12 21:39 ` paolo.carlini at oracle dot com
2013-06-13 7:14 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-06-12 21:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #9)
> It's broken since the Bugzilla update, unfortunately.
No broken since updating the server to a new machine. Updating Bugzilla was
not the issue but updating the subversion on the server was.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (8 preceding siblings ...)
2013-06-12 21:31 ` pinskia at gcc dot gnu.org
@ 2013-06-12 21:39 ` paolo.carlini at oracle dot com
2013-06-13 7:14 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-12 21:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Right sorry, the problem is the new subversion not sending commit messages at
all to Bugzilla.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
` (9 preceding siblings ...)
2013-06-12 21:39 ` paolo.carlini at oracle dot com
@ 2013-06-13 7:14 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-06-13 7:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fche at redhat dot com,
| |jakub at gcc dot gnu.org
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In particular, the problem is that we used to have a hacked up version of
svnmailer, which created the special emails for bugzilla, now the server has a
new upstream version of svnmailer and these hacks weren't ported to it.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-06-13 7:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 0:23 [Bug regression/57551] New: [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE hp at gcc dot gnu.org
2013-06-07 9:46 ` [Bug regression/57551] " hubicka at gcc dot gnu.org
2013-06-07 12:50 ` hubicka at gcc dot gnu.org
2013-06-07 13:52 ` jason at gcc dot gnu.org
2013-06-07 14:54 ` hubicka at gcc dot gnu.org
2013-06-11 7:57 ` hubicka at ucw dot cz
2013-06-11 14:17 ` jason at gcc dot gnu.org
2013-06-12 0:15 ` hp at gcc dot gnu.org
2013-06-12 12:12 ` paolo.carlini at oracle dot com
2013-06-12 21:31 ` pinskia at gcc dot gnu.org
2013-06-12 21:39 ` paolo.carlini at oracle dot com
2013-06-13 7:14 ` 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).