Bug 33645 - [4.3 Regression] undefined static variable in vortex for -fno-unit-at-a-time
: [4.3 Regression] undefined static variable in vortex for -fno-unit-at-a-time
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: tree-optimization
: 4.3.0
: P1 normal
: 4.3.0
Assigned To: Jakub Jelinek
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-10-03 18:18 UTC by Janis Johnson
Modified: 2007-10-12 08:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-10-11 11:58:29


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2007-10-03 18:18:39 UTC
Benchmark vortex from SPEC CPU2000 compiled with "-O2 -fno-unit-at-atime" for
powerpc64-linux fails to build due to a missing symbol.  For each of 24 cross
cc1's that I tried, symbol "That" from the following minimized testcase is not
defined in the .s file:

extern void bar (int *);
void
foo (void)
{
  static int That;
  static int *This = &That;

  bar (This);
}

The failure starts with this patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=126947

    r126947 | hubicka | 2007-07-26 03:43:40 +0000 (Thu, 26 Jul 2007)
Comment 1 Jakub Jelinek 2007-10-12 07:10:49 UTC
Subject: Bug 33645

Author: jakub
Date: Fri Oct 12 07:10:22 2007
New Revision: 129254

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129254
Log:
    PR tree-optimization/33645
    * tree-ssa-live.c (mark_all_vars_used): Add data argument,
    pass it to walk_tree.
    (mark_all_vars_used_1): Pass data through to mark_all_vars_used.
    When calling set_is_used on a VAR_DECL, if data is not NULL and
    its DECL_UID is in the bitmap, call mark_all_vars_used on its
    DECL_INITIAL after clearing the bit in bitmap.
    (remove_unused_locals): Adjust mark_all_vars_used callers.
    Instead of removing unused global vars from unexpanded_var_list
    immediately record them in bitmap, call mark_all_vars_used on
    all used global vars from unexpanded_var_list and only purge
    global vars that weren't found used even during that step.

    * gcc.dg/pr33645-1.c: New test.
    * gcc.dg/pr33645-2.c: New test.
    * gcc.dg/pr33645-3.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr33645-1.c
    trunk/gcc/testsuite/gcc.dg/pr33645-2.c
    trunk/gcc/testsuite/gcc.dg/pr33645-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-live.c
Comment 2 Jakub Jelinek 2007-10-12 08:33:25 UTC
Fixed.