[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2013-01-15 Thread rguenth at gcc dot gnu.org


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



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #20 from Richard Biener rguenth at gcc dot gnu.org 2013-01-15 
13:54:58 UTC ---

Thus, fixed.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2013-01-15 Thread hubicka at gcc dot gnu.org


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



--- Comment #21 from Jan Hubicka hubicka at gcc dot gnu.org 2013-01-15 
18:23:24 UTC ---

Yep, it is kind of kludgy, but other way to handle it is to rewrite the

constant pool that is tied into target interface so it is rather hard and I do

not see constant pool really being trouble to anything - it works reasonably

well the odd way it is designed.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-11-15 Thread dje at gcc dot gnu.org


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



--- Comment #19 from David Edelsohn dje at gcc dot gnu.org 2012-11-15 
14:04:10 UTC ---

The problem still is present, but when I asked Honza about the status on IRC,

he seemed to say the work-around patch was the correct fix -- that this

behavior is expected.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-11-14 Thread pinskia at gcc dot gnu.org


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



--- Comment #18 from Andrew Pinski pinskia at gcc dot gnu.org 2012-11-15 
03:18:18 UTC ---

Does this still happen?


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-09-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #11 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-11 
08:40:25 UTC ---
Author: hubicka
Date: Fri May 11 08:40:15 2012
New Revision: 187397

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=187397
Log:

PR bootstrap/53300
* varpool.c (varpool_assemble_decl): Also output constat pool entries
that output_constant_pool missed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/varpool.c


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #12 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE 2012-05-11 10:08:11 UTC ---
 --- Comment #5 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-10 
 17:59:46 UTC ---
[...]
 Does the following hack avoid the problem? Perhaps during the years when
 varpool
 was outputting constant pool vars something broke in the code tracking when 
 the
 var is needed.

It does on i386-pc-solaris2.10.  Ada bootstrap completed with it.

Thanks.
Rainer


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #13 from David Edelsohn dje at gcc dot gnu.org 2012-05-11 
15:07:46 UTC ---
Created attachment 27377
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27377
Pre-processed source for libcpp/line-map.c


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #15 from David Edelsohn dje at gcc dot gnu.org 2012-05-11 
15:09:09 UTC ---
Created attachment 27379
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27379
Wrong assembly output for line-map.c


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #14 from David Edelsohn dje at gcc dot gnu.org 2012-05-11 
15:08:29 UTC ---
Created attachment 27378
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27378
Correct assembly output for line-map.c


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #16 from David Edelsohn dje at gcc dot gnu.org 2012-05-11 
15:11:59 UTC ---
The mis-compiled file is libcpp/line-map.c.  I have attached the pre-processed
output for line-map.c on AIX. I also have attached assembly files showing the
correct and incorrect output.  The difference is:

--- line-map.s.good 2012-05-11 11:01:33.0 -0400
+++ line-map.s.bad  2012-05-11 11:00:43.0 -0400
@@ -4536,26 +4536,6 @@
.byte 10
.byte Macro line maps
.byte 10, 0
-   .space 2
-LC..0:
-   .byte LC_ENTER
-   .byte 0
-   .space 3
-LC..1:
-   .byte LC_LEAVE
-   .byte 0
-   .space 3
-LC..2:
-   .byte LC_RENAME
-   .byte 0
-   .space 2
-LC..3:
-   .byte LC_RENAME_VERBATIM
-   .byte 0
-   .space 1
-LC..4:
-   .byte LC_ENTER_MACRO
-   .byte 0
.csect _linemap.rw_[RW],4
.align 2
.set LANCHOR..1,$ + 0

which corresponds to

enum lc_reason
{
  LC_ENTER = 0,
  LC_LEAVE,
  LC_RENAME,
  LC_RENAME_VERBATIM,
  LC_ENTER_MACRO

};


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-11 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #17 from David Edelsohn dje at gcc dot gnu.org 2012-05-11 
15:44:44 UTC ---
A minimal testcase:

enum lc_reason
{
  LC_ENTER = 0,
  LC_LEAVE,
  LC_RENAME,
  LC_RENAME_VERBATIM,
  LC_ENTER_MACRO

};

const char *
foo (enum lc_reason reason)
{
  const char *lc_reasons_v[LC_ENTER_MACRO + 1]
  = { LC_ENTER, LC_LEAVE, LC_RENAME, LC_RENAME_VERBATIM,
   LC_ENTER_MACRO };

  return lc_reasons_v[reason];
}


Without your TREE_ASM_WRITTEN kludge, the string values of the array are not
emitted in the assembly. The array referencing the strings is emitted, but the
values themselves are not.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Target||*-*-aix
   Target Milestone|--- |4.8.0
Summary|AIX bootstrap related to|[4.8 Regression] AIX
   |varpool patch   |bootstrap related to
   ||varpool patch


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ro at gcc dot gnu.org

--- Comment #2 from Rainer Orth ro at gcc dot gnu.org 2012-05-10 12:15:13 UTC 
---
I'm seeing a similar failure linking gnatxref on i386-pc-solaris2.10:

Undefinedfirst referenced
 symbol  in file
.LC0./xref_lib.o
ld: fatal: symbol referencing errors. No output written to ../../gnatxref
collect2: error: ld returned 1 exit status
gnatlink: error when calling /var/gcc/gcc-4.8.0-20120509/10-gcc/gcc/xgcc
make[3]: *** [common-tools] Error 4
make[3]: Leaving directory `/var/gcc/gcc-4.8.0-20120509/10-gcc/gcc/ada/tools'
make[2]: *** [gnattools-native] Error 2
make[2]: Leaving directory `/var/gcc/gcc-4.8.0-20120509/10-gcc/gnattools'

Reverting your patch allows the build to complete.

  Rainer


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

David Edelsohn dje at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||assemble-failure
 Target|*-*-aix |powerpc-ibm-aix*,
   ||i386-pc-solaris2.10

--- Comment #3 from David Edelsohn dje at gcc dot gnu.org 2012-05-10 13:12:45 
UTC ---
If the solaris problem is the same root cause, hopefully it will be easier to
reproduce.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-10 
17:17:01 UTC ---
Would be possible to have testcase with an explanation what is missing?

The TOC symbols are output by output_constant_pool_1 that calls
ASM_OUTPUT_SPECIAL_POOL_ENTRY.  I am not sure how varpool variable removal is
involved here, since TOC never lands the varpool.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #5 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-10 
17:59:46 UTC ---
i am still somewhat in dark on root of this problem.  What may actually be
problem here is the fact that varpool no longer outputs constant pool decls
relying on constant pool code to manage them on its own.

Does the following hack avoid the problem? Perhaps during the years when
varpool
was outputting constant pool vars something broke in the code tracking when the
var is needed.

Index: varpool.c
===
--- varpool.c   (revision 187371)
+++ varpool.c   (working copy)
@@ -282,7 +282,8 @@ varpool_assemble_decl (struct varpool_no

   /* Constant pool is output from RTL land when the reference
  survive till this level.  */
-  if (DECL_IN_CONSTANT_POOL (decl))
+  if (DECL_IN_CONSTANT_POOL (decl)
+   TREE_ASM_WRITTEN (decl))
 return false;

   /* Decls with VALUE_EXPR should not be in the varpool at all.  They


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #6 from David Edelsohn dje at gcc dot gnu.org 2012-05-10 18:37:12 
UTC ---
The first failure occurs for me when linking gcov, but I am not sure which
object file is missing the symbols.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #7 from David Edelsohn dje at gcc dot gnu.org 2012-05-10 20:27:52 
UTC ---
Your patch in comment #5 seems to work around the problem. I will try to figure
out which file omits the symbols.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #8 from Jan Hubicka hubicka at ucw dot cz 2012-05-10 20:48:52 UTC 
---
 Your patch in comment #5 seems to work around the problem. I will try to 
 figure
 out which file omits the symbols.

Thank you! If you could test it fully, I will commit it for time being to
unbreak the
bootstrap.  We can solve this problem incrementally.

Honza


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot
   ||gnu.org

--- Comment #9 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-05-10 
22:36:34 UTC ---
 I'm seeing a similar failure linking gnatxref on i386-pc-solaris2.10:
 
 Undefinedfirst referenced
  symbol  in file
 .LC0./xref_lib.o

Likewise on x86/Linux.


[Bug bootstrap/53300] [4.8 Regression] AIX bootstrap related to varpool patch

2012-05-10 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53300

--- Comment #10 from Jan Hubicka hubicka at ucw dot cz 2012-05-10 23:03:44 
UTC ---
 Likewise on x86/Linux.
Bootstrap with Ada works for me, but I will test the workaround posted above
and commit if it passes.  We can deal with this incrementally.  Apparently
there is some latent bug in the constant pool handling code...