public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
@ 2011-01-06 17:40 zsojka at seznam dot cz
  2011-01-06 18:30 ` [Bug tree-optimization/47193] " hubicka at ucw dot cz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-06 17:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

           Summary: [4.6 Regression] ICE: in
                    function_and_variable_visibility, at ipa.c:857 with
                    static var weakref'd to other weakref'd static var
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
                CC: hubicka@gcc.gnu.org
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


----- testcase.c -----
static int i __attribute__ ((weakref ("j")));
static int j __attribute__ ((weakref ("k")));
----------------------
(reduced from gcc.dg/attr-weakref-1.c)
PR47190 was reduced from the same testcase, but ended in different ICE.

Compiler output:
$ gcc testcase.c
testcase.c:2:1: internal compiler error: in function_and_variable_visibility,
at ipa.c:857
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


(gdb) bt
#0  fancy_abort (file=0x11b8518
"/usr/portage/distfiles/svn-src/gcc/trunk/gcc/ipa.c", line=857, 
    function=0x11b86e0 "function_and_variable_visibility") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/diagnostic.c:892
#1  0x0000000000b1c6b2 in function_and_variable_visibility (whole_program=0
'\000')
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/ipa.c:857
#2  0x0000000000b1c93d in whole_program_function_and_variable_visibility ()
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/ipa.c:1047
#3  0x00000000007f1e56 in execute_one_pass (pass=0x163cc60) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/passes.c:1553
#4  0x00000000007f258a in execute_ipa_pass_list (pass=0x163cc60)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/passes.c:1920
#5  0x0000000000af9e04 in ipa_passes () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1759
#6  cgraph_optimize () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1794
#7  0x0000000000af9fda in cgraph_finalize_compilation_unit ()
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1042
#8  0x0000000000509d6c in c_write_global_declarations () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/c-decl.c:9843
#9  0x00000000008db9e6 in compile_file (argc=12, argv=0x7fffffffdae8)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:591
#10 do_compile (argc=12, argv=0x7fffffffdae8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1874
#11 toplev_main (argc=12, argv=0x7fffffffdae8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1937
#12 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6
#13 0x00000000004f0955 in _start ()

Tested revisions:
r168535 - crash
r165699 - OK
4.5 r168062 - OK


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

* [Bug tree-optimization/47193] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
  2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
@ 2011-01-06 18:30 ` hubicka at ucw dot cz
  2011-01-06 18:50 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at ucw dot cz @ 2011-01-06 18:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

--- Comment #1 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-06 18:00:31 UTC ---
> static int i __attribute__ ((weakref ("j")));
> static int j __attribute__ ((weakref ("k")));
Also invalid, will make fix for that too.

Honza


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

* [Bug tree-optimization/47193] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
  2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
  2011-01-06 18:30 ` [Bug tree-optimization/47193] " hubicka at ucw dot cz
@ 2011-01-06 18:50 ` hjl.tools at gmail dot com
  2011-01-06 18:52 ` zsojka at seznam dot cz
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-06 18:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.06 18:33:24
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-06 18:33:24 UTC ---
It is caused by revision 166812:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00701.html


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

* [Bug tree-optimization/47193] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
  2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
  2011-01-06 18:30 ` [Bug tree-optimization/47193] " hubicka at ucw dot cz
  2011-01-06 18:50 ` hjl.tools at gmail dot com
@ 2011-01-06 18:52 ` zsojka at seznam dot cz
  2011-01-06 19:00 ` hubicka at ucw dot cz
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-06 18:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-06 18:34:31 UTC ---
----- testcase2.c -----
typedef int vtype;
static vtype Wv10a __attribute__((weakref ("Wv10b")));
static vtype Wv10b __attribute__((weakref ("Wv10c")));
static vtype Wv10c __attribute__((weakref ("Wv10d")));
static vtype Wv10d __attribute__((weakref ("wv10")));
extern vtype wv10;
-----------------------

Is this also invalid? It fails the same way:
$ gcc testcase2.c
testcase2.c:6:1: internal compiler error: in function_and_variable_visibility,
at ipa.c:857
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug tree-optimization/47193] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
  2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-01-06 18:52 ` zsojka at seznam dot cz
@ 2011-01-06 19:00 ` hubicka at ucw dot cz
  2011-01-19 20:56 ` jakub at gcc dot gnu.org
  2011-01-22 16:26 ` hubicka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at ucw dot cz @ 2011-01-06 19:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-06 18:52:28 UTC ---
> typedef int vtype;
> static vtype Wv10a __attribute__((weakref ("Wv10b")));
> static vtype Wv10b __attribute__((weakref ("Wv10c")));
> static vtype Wv10c __attribute__((weakref ("Wv10d")));
> static vtype Wv10d __attribute__((weakref ("wv10")));
> extern vtype wv10;
> -----------------------
> 
> Is this also invalid? It fails the same way:
No idea,  I think the aliased symbol should always be external one, but the
sanity check
might be overactive here (the weakref code seems to be skipping transparent
aliases,
so it should be equivalent of aliasing Wv10 in all cases).

Honza


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

* [Bug tree-optimization/47193] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
  2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-01-06 19:00 ` hubicka at ucw dot cz
@ 2011-01-19 20:56 ` jakub at gcc dot gnu.org
  2011-01-22 16:26 ` hubicka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-19 20:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug tree-optimization/47193] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var
  2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-01-19 20:56 ` jakub at gcc dot gnu.org
@ 2011-01-22 16:26 ` hubicka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-01-22 16:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47193

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-22 15:54:35 UTC ---
Seems to work for me now.  Probably fixed with other aliasing changes.

jh@gcc10:~/trunk/build/gcc$ cat >weak2.c
typedef int vtype;
static vtype Wv10a __attribute__((weakref ("Wv10b")));
static vtype Wv10b __attribute__((weakref ("Wv10c")));
static vtype Wv10c __attribute__((weakref ("Wv10d")));
static vtype Wv10d __attribute__((weakref ("wv10")));
extern vtype wv10;
jh@gcc10:~/trunk/build/gcc$ ./xgcc -B ./  weak2.c
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
jh@gcc10:~/trunk/build/gcc$ cat >weak3.c
static int i __attribute__ ((weakref ("j")));
static int j __attribute__ ((weakref ("k")));
jh@gcc10:~/trunk/build/gcc$ ./xgcc -B ./  weak3.c
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status


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

end of thread, other threads:[~2011-01-22 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 17:40 [Bug tree-optimization/47193] New: [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:857 with static var weakref'd to other weakref'd static var zsojka at seznam dot cz
2011-01-06 18:30 ` [Bug tree-optimization/47193] " hubicka at ucw dot cz
2011-01-06 18:50 ` hjl.tools at gmail dot com
2011-01-06 18:52 ` zsojka at seznam dot cz
2011-01-06 19:00 ` hubicka at ucw dot cz
2011-01-19 20:56 ` jakub at gcc dot gnu.org
2011-01-22 16:26 ` hubicka 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).