Patchwork patch to fix pr55049

login
register
mail settings
Submitter Vladimir Makarov
Date Oct. 24, 2012, 5:37 p.m.
Message ID <50882746.5030908@redhat.com>
Download mbox | patch
Permalink /patch/193878/
State New
Headers show

Comments

Vladimir Makarov - Oct. 24, 2012, 5:37 p.m.
The following path shouldfix

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

   The patch was successfully bootstrapped on x86-64. Sorry, I can not 
bootstrap with mx32 because of libraries absence.

   Committed as rev. 192771.

2012-10-24  Vladimir Makarov  <vmakarov@redhat.com>

     PR bootstrap/55049
     * lra-constraints.c (extract_loc_address_regs): Pass top_p for
     ZERO_EXTEND operand.
svn diff --diff-cmd diff -x -up lra-constraints.c
H.J. Lu - Oct. 24, 2012, 10:35 p.m.
On Wed, Oct 24, 2012 at 10:37 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
>   The following path shouldfix
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55049
>
>   The patch was successfully bootstrapped on x86-64. Sorry, I can not
> bootstrap with mx32 because of libraries absence.

It passed libgcc.  Now I got

[hjl@gnu-tools-1 gcc]$ cat /tmp/x.c
enum gomp_schedule_type
{
  GFS_GUIDED,
  GFS_AUTO
};
struct gomp_work_share
{
  enum gomp_schedule_type sched;
};
struct gomp_team_state
{
  struct gomp_work_share *work_share;
};
struct gomp_thread
{
  void *data;
  struct gomp_team_state ts;
};
extern __thread struct gomp_thread gomp_tls_data;
_Bool
foo (void)
{
  return gomp_tls_data.ts.work_share->sched == GFS_GUIDED;
}
[hjl@gnu-tools-1 gcc]$ ./xgcc -B./ -mx32 -S -O2 /tmp/x.c
/tmp/x.c: In function ‘foo’:
/tmp/x.c:24:1: internal compiler error: in check_rtl, at lra.c:2014
 }
 ^
0x8bfdbd check_rtl
	/export/gnu/import/git/gcc/gcc/lra.c:2014
0x8c071d lra(_IO_FILE*)
	/export/gnu/import/git/gcc/gcc/lra.c:2372
0x875f89 do_reload
	/export/gnu/import/git/gcc/gcc/ira.c:4613
0x876182 rest_of_handle_reload
	/export/gnu/import/git/gcc/gcc/ira.c:4719
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-tools-1 gcc]$

Patch

Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 192770)
+++ lra-constraints.c	(working copy)
@@ -515,6 +515,12 @@  extract_loc_address_regs (bool top_p, en
     case PC:
       return;
 
+    case ZERO_EXTEND:
+      /* Pass TOP_P for displacement.  */
+      extract_loc_address_regs (top_p, mode, as, &XEXP (*loc, 0), context_p,
+				code, index_code, modify_p, ad);
+      return;
+
     case PLUS:
     case LO_SUM:
       /* When we have an address that is a sum, we must determine