public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit
@ 2014-09-05 13:19 jakub at gcc dot gnu.org
  2014-09-05 21:39 ` [Bug middle-end/63186] " jakub at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-05 13:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

            Bug ID: 63186
           Summary: [4.9/5 Regression] Undefined .L* symbols because of
                    fnsplit
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org

Starting with r202185 the following testcase is compiled with undefined .L*
symbols at -O2:

void *a;
int b, c, d;

void
bar ()
{
  switch (c)
    {
    case 0:
    lab:
      __asm__ ("");
      return;
    default:
      break;
    }
  b = 0;
  d = 0;
  a = &&lab;
}

void
foo ()
{
  bar ();
}

The problem is that find_split_points (visit_bb, something else?) doesn't
consider GIMPLE_LABEL stmts with FORCED_LABEL.  Either blocks with such labels
should be immediately marked as inappropriate to stay in the caller part (i.e.
non-fn.part.N), or we need to analyze whether nothing that would be moved to
the fn.part.N function references labels that stay in fn.  Perhaps the other
direction can be a problem too.  Honza, can you please have a look?


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
@ 2014-09-05 21:39 ` jakub at gcc dot gnu.org
  2014-09-08  0:35 ` hubicka at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-05 21:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For the case when any of the bbs considered for being split (into
function.part.N) refers to a label which is defined in one of the basic blocks
that are not considered for split we already kind of have code to handle that,
the DECL_UID of the label is put into non_ssa_vars bitmap and then
verify_non_ssa_vars is called which if it sees a GIMPLE_LABEL with a label set
in non_ssa_vars bitmap will give up.  Unfortunately, verify_non_ssa_vars
doesn't walk all basic blocks that aren't being split off, but only those that
can be executed before reaching the split entry_bb.  In the testcase the label
is in a basic block that just returns afterwards.  So perhaps we'd need to
remember if we put any LABEL_DECL uids into non_ssa_vars bitmap and if yes, in
addition to what non_ssa_vars does right now also walk all other basic blocks
that would not be split away (just the labels at the start of each) and just
handle GIMPLE_LABELs for those.  Or do that always.

Not sure what is supposed to handle the case when a label anywhere in the
split_bbs would be referenced from the header basic blocks though.


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
  2014-09-05 21:39 ` [Bug middle-end/63186] " jakub at gcc dot gnu.org
@ 2014-09-08  0:35 ` hubicka at gcc dot gnu.org
  2014-09-08  4:21 ` andi-gcc at firstfloor dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-09-08  0:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-09-08
           Assignee|unassigned at gcc dot gnu.org      |hubicka at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I guess it is easiest to disallow nonlocal goto, forced labels and their
references in the function headers, I will take a look.


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
  2014-09-05 21:39 ` [Bug middle-end/63186] " jakub at gcc dot gnu.org
  2014-09-08  0:35 ` hubicka at gcc dot gnu.org
@ 2014-09-08  4:21 ` andi-gcc at firstfloor dot org
  2014-09-08  9:06 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-09-08  4:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

Andi Kleen <andi-gcc at firstfloor dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andi-gcc at firstfloor dot org

--- Comment #3 from Andi Kleen <andi-gcc at firstfloor dot org> ---
Looks very similar to my problem in 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61635


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-09-08  4:21 ` andi-gcc at firstfloor dot org
@ 2014-09-08  9:06 ` rguenth at gcc dot gnu.org
  2014-09-11  6:47 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-09-08  9:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.2


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-09-08  9:06 ` rguenth at gcc dot gnu.org
@ 2014-09-11  6:47 ` hubicka at gcc dot gnu.org
  2014-09-19  9:25 ` dan at danny dot cz
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-09-11  6:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Thu Sep 11 06:46:23 2014
New Revision: 215149

URL: https://gcc.gnu.org/viewcvs?rev=215149&root=gcc&view=rev
Log:

    PR tree-optimization/63186
    * ipa-split.c (test_nonssa_use): Skip nonforced labels.
    (mark_nonssa_use): Likewise.
    (verify_non_ssa_vars): Verify all header blocks for label
    definitions.

    * gcc.dg/pr63186.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/pr63186.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-split.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-09-11  6:47 ` hubicka at gcc dot gnu.org
@ 2014-09-19  9:25 ` dan at danny dot cz
  2014-09-19 21:41 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dan at danny dot cz @ 2014-09-19  9:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

--- Comment #5 from Dan Horák <dan at danny dot cz> ---
Jan, can you backport the fix also to 4.9? It is causing a problem in Fedora
where at least one build is failing due this problem.
>From gcc-bugs-return-462057-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 19 09:35:00 2014
Return-Path: <gcc-bugs-return-462057-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24256 invoked by alias); 19 Sep 2014 09:34:59 -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 24170 invoked by uid 55); 19 Sep 2014 09:34:48 -0000
From: "paolo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58328] [C++11] bogus: error: constructor required before non-static data member for
Date: Fri, 19 Sep 2014 09:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo at gcc dot gnu.org
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:
Message-ID: <bug-58328-4-UCW6UW5mJn@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58328-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58328-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: 2014-09/txt/msg01891.txt.bz2
Content-length: 469

https://gcc.gnu.org/bugzilla/show_bug.cgi?idX328

--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Sep 19 09:34:14 2014
New Revision: 215386

URL: https://gcc.gnu.org/viewcvs?rev!5386&root=gcc&view=rev
Log:
2014-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58328
    * g++.dg/cpp0x/nsdmi10.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi10.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/63186] [4.9/5 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-09-19  9:25 ` dan at danny dot cz
@ 2014-09-19 21:41 ` hubicka at gcc dot gnu.org
  2014-09-19 22:50 ` [Bug middle-end/63186] [4.9 " hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-09-19 21:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Yes, this patch should apply to 4.9 as well.


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

* [Bug middle-end/63186] [4.9 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-09-19 21:41 ` hubicka at gcc dot gnu.org
@ 2014-09-19 22:50 ` hubicka at gcc dot gnu.org
  2014-10-01 14:42 ` jakub at gcc dot gnu.org
  2014-10-03  7:37 ` hubicka at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-09-19 22:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.9/5 Regression]          |[4.9 Regression] Undefined
                   |Undefined .L* symbols       |.L* symbols because of
                   |because of fnsplit          |fnsplit

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Solved on mainline; I think 4.8 and earlier branches are also affected.


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

* [Bug middle-end/63186] [4.9 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-09-19 22:50 ` [Bug middle-end/63186] [4.9 " hubicka at gcc dot gnu.org
@ 2014-10-01 14:42 ` jakub at gcc dot gnu.org
  2014-10-03  7:37 ` hubicka at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-01 14:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Oct  1 14:41:49 2014
New Revision: 215765

URL: https://gcc.gnu.org/viewcvs?rev=215765&root=gcc&view=rev
Log:
    Backported from mainline
    2014-09-10  Jan Hubicka  <hubicka@ucw.cz>

    PR tree-optimization/63186
    * ipa-split.c (test_nonssa_use): Skip nonforced labels.
    (mark_nonssa_use): Likewise.
    (verify_non_ssa_vars): Verify all header blocks for label
    definitions.

    * gcc.dg/pr63186.c: New testcase.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr63186.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/ipa-split.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/63186] [4.9 Regression] Undefined .L* symbols because of fnsplit
  2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-10-01 14:42 ` jakub at gcc dot gnu.org
@ 2014-10-03  7:37 ` hubicka at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-10-03  7:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63186

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Backported to branch. Thanks, Jakub.


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

end of thread, other threads:[~2014-10-03  7:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 13:19 [Bug middle-end/63186] New: [4.9/5 Regression] Undefined .L* symbols because of fnsplit jakub at gcc dot gnu.org
2014-09-05 21:39 ` [Bug middle-end/63186] " jakub at gcc dot gnu.org
2014-09-08  0:35 ` hubicka at gcc dot gnu.org
2014-09-08  4:21 ` andi-gcc at firstfloor dot org
2014-09-08  9:06 ` rguenth at gcc dot gnu.org
2014-09-11  6:47 ` hubicka at gcc dot gnu.org
2014-09-19  9:25 ` dan at danny dot cz
2014-09-19 21:41 ` hubicka at gcc dot gnu.org
2014-09-19 22:50 ` [Bug middle-end/63186] [4.9 " hubicka at gcc dot gnu.org
2014-10-01 14:42 ` jakub at gcc dot gnu.org
2014-10-03  7:37 ` 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).