public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/36907]  New: [4.4 Regression]: Gcc failed to bootstrap
@ 2008-07-23 11:33 hjl dot tools at gmail dot com
  2008-07-23 12:41 ` [Bug bootstrap/36907] " hjl dot tools at gmail dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 11:33 UTC (permalink / raw)
  To: gcc-bugs

Gcc 4.4 revision 138076 failed to boot strap on Linux/ia64:

/export/gnu/import/svn/gcc-test/bld/./prev-gcc/xgcc
-B/export/gnu/import/svn/gcc-test/bld/./prev-gcc/
-B/usr/local/ia64-unknown-linux-gnu/bin/ -c  -DUSE_LIBUNWIND_EXCEPTIONS -g -O2
-DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros                                  
-Wno-overlength-strings -Werror   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
-I../../src/gcc -I../../src/gcc/build -I../../src/gcc/../include
-I../../src/gcc/../libcpp/include  -I../../src/gcc/../libdecnumber
-I../../src/gcc/../libdecnumber/dpd -I../libdecnumber  -o build/errors.o
../../src/gcc/errors.c
../../src/gcc/errors.c: In function 'trim_filename':
../../src/gcc/errors.c:124: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[5]: *** [build/errors.o] Error 1
make[5]: *** Waiting for unfinished jobs....

Revision 138073 is OK. I think revision 138075:

http://gcc.gnu.org/ml/gcc-cvs/2008-07/msg00785.html

is the cause.


-- 
           Summary: [4.4 Regression]: Gcc failed to bootstrap
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: ia64-unknown-linux-gnu


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
@ 2008-07-23 12:41 ` hjl dot tools at gmail dot com
  2008-07-23 13:29 ` hjl dot tools at gmail dot com
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 12:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2008-07-23 12:41 -------
It also fails to boostrap on Linux/x86-64:

libtool: compile:  /export/gnu/import/svn/gcc-test/bld/./gcc/xgcc
-B/export/gnu/import/svn/gcc-test/bld/./gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include -c -I.
-I/export/gnu/import/svn/gcc-test/src/libobjc -g -O2 -W -Wall -Wwrite-strings
-Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
-I/export/gnu/import/svn/gcc-test/src/libobjc/objc
-I/export/gnu/import/svn/gcc-test/src/libobjc/../gcc
-I/export/gnu/import/svn/gcc-test/src/libobjc/../gcc/config -I../.././gcc
-I/export/gnu/import/svn/gcc-test/src/libobjc/../include
/export/gnu/import/svn/gcc-test/src/libobjc/encoding.c  -fPIC -DPIC -o
.libs/encoding.o
In file included from ../.././gcc/tm.h:7,
                 from
/export/gnu/import/svn/gcc-test/src/libobjc/encoding.c:34:
../.././gcc/options.h:516: error: expected ')' before '*' token
../.././gcc/options.h:525: error: expected ')' before '*' token
make[4]: *** [encoding.lo] Error 1

I used

        ../src/configure --enable-checking=assert --enable-clocale=gnu
--with-system-zlib --enable-shared --with-demangler-in-ld

to configure gcc.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
  2008-07-23 12:41 ` [Bug bootstrap/36907] " hjl dot tools at gmail dot com
@ 2008-07-23 13:29 ` hjl dot tools at gmail dot com
  2008-07-23 13:39 ` hjl dot tools at gmail dot com
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 13:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2008-07-23 13:28 -------
On ia64:

Program received signal SIGSEGV, Segmentation fault.
0x4000000000e16760 in ia64_variable_issue (dump=0x20000000003f9e50,
    sched_verbose=0, insn=0x2000000003fec6e0, can_issue_more=1)
    at ../../src/gcc/config/ia64/ia64.c:6651
6651          stops_p [INSN_UID (insn)] = stop_before_p;
(gdb) p stops_p
$2 = 0x0
(gdb) bt
#0  0x4000000000e16760 in ia64_variable_issue (dump=0x20000000003f9e50,
    sched_verbose=0, insn=0x2000000003fec6e0, can_issue_more=1)
    at ../../src/gcc/config/ia64/ia64.c:6651
#1  0x40000000011bc340 in schedule_block (target_bb=0x60000fffff89b290,
    rgn_n_insns1=9) at ../../src/gcc/haifa-sched.c:2458
#2  0x4000000000870a70 in schedule_region (rgn=0)
    at ../../src/gcc/sched-rgn.c:2839
#3  0x40000000008715d0 in schedule_insns () at ../../src/gcc/sched-rgn.c:2959
#4  0x40000000008736e0 in rest_of_handle_sched2 ()
    at ../../src/gcc/sched-rgn.c:3190
#5  0x40000000006b8b60 in execute_one_pass (pass=0x600000000008e9f8)
    at ../../src/gcc/passes.c:1295
#6  0x40000000006b9300 in execute_pass_list (pass=0x600000000008e9f8)
    at ../../src/gcc/passes.c:1345
#7  0x40000000006b9380 in execute_pass_list (pass=0x600000000008d100)
    at ../../src/gcc/passes.c:1346
#8  0x40000000006b9380 in execute_pass_list (pass=0x600000000008d0b0)
    at ../../src/gcc/passes.c:1346
#9  0x4000000000a05070 in tree_rest_of_compilation (fndecl=0x2000000003fb1700)
    at ../../src/gcc/tree-optimize.c:417
#10 0x4000000000e3fc40 in cgraph_expand_function (node=0x2000000003fb2100)
    at ../../src/gcc/cgraphunit.c:1158
#11 0x4000000000e40210 in cgraph_expand_all_functions ()
---Type <return> to continue, or q <return> to quit---
    at ../../src/gcc/cgraphunit.c:1221
#12 0x4000000000e418b0 in cgraph_optimize () at ../../src/gcc/cgraphunit.c:1438
#13 0x400000000004e470 in c_write_global_declarations ()
    at ../../src/gcc/c-decl.c:8084
#14 0x40000000008f3640 in compile_file () at ../../src/gcc/toplev.c:971
#15 0x40000000008f9be0 in do_compile () at ../../src/gcc/toplev.c:2158
#16 0x40000000008f9d70 in toplev_main (argc=13, argv=0x60000fffff89b728)
    at ../../src/gcc/toplev.c:2190
#17 0x4000000000195d60 in main (argc=13, argv=0x60000fffff89b728)
    at ../../src/gcc/main.c:35
(gdb)


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |karthikkumar at gcc dot gnu
                   |                            |dot org


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
  2008-07-23 12:41 ` [Bug bootstrap/36907] " hjl dot tools at gmail dot com
  2008-07-23 13:29 ` hjl dot tools at gmail dot com
@ 2008-07-23 13:39 ` hjl dot tools at gmail dot com
  2008-07-23 13:47 ` hjl dot tools at gmail dot com
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 13:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2008-07-23 13:39 -------
The problem on Fedora 9/x86-64 may be due to FILE is undeclared in

extern void cl_optimization_print (FILE *, int, struct cl_optimization *);
extern void cl_target_option_print (FILE *, int, struct cl_target_option *);

in options.h.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2008-07-23 13:39 ` hjl dot tools at gmail dot com
@ 2008-07-23 13:47 ` hjl dot tools at gmail dot com
  2008-07-23 14:32 ` hjl dot tools at gmail dot com
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 13:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2008-07-23 13:46 -------
(In reply to comment #3)
> The problem on Fedora 9/x86-64 may be due to FILE is undeclared in
> 
> extern void cl_optimization_print (FILE *, int, struct cl_optimization *);
> extern void cl_target_option_print (FILE *, int, struct cl_target_option *);
> 
> in options.h.
> 

It happens when building libobjc.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2008-07-23 13:47 ` hjl dot tools at gmail dot com
@ 2008-07-23 14:32 ` hjl dot tools at gmail dot com
  2008-07-23 15:23 ` gnu at the-meissners dot org
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 14:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2008-07-23 14:31 -------
decode_options doesn't allow backend to override options, which breaks
ia64 and maybe other targets.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2008-07-23 14:32 ` hjl dot tools at gmail dot com
@ 2008-07-23 15:23 ` gnu at the-meissners dot org
  2008-07-23 15:33 ` hjl dot tools at gmail dot com
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-23 15:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from gnu at the-meissners dot org  2008-07-23 15:22 -------
Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap

On Wed, Jul 23, 2008 at 01:46:30PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #4 from hjl dot tools at gmail dot com  2008-07-23 13:46 -------
> (In reply to comment #3)
> > The problem on Fedora 9/x86-64 may be due to FILE is undeclared in
> > 
> > extern void cl_optimization_print (FILE *, int, struct cl_optimization *);
> > extern void cl_target_option_print (FILE *, int, struct cl_target_option *);
> > 
> > in options.h.
> > 
> 
> It happens when building libobjc.

I didn't have objective c, java, or ADA on the system.  I'm going to kick off a
build shortly with the following patch to see if it allows objc to build:

Index: gcc/optc-gen.awk
===================================================================
--- gcc/optc-gen.awk    (revision 138086)
+++ gcc/optc-gen.awk    (working copy)
@@ -225,7 +225,7 @@ for (i = 0; i < n_opts; i++) {
 print "};"

 print "";
-print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2)"
+print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2) &&
!defined(IN_TARGET_LIBS)"
 print "";
 print "/* Save optimization variables into a structure.  */"
 print "void";
Index: gcc/opth-gen.awk
===================================================================
--- gcc/opth-gen.awk    (revision 138086)
+++ gcc/opth-gen.awk    (working copy)
@@ -95,7 +95,7 @@ print ""
 # Also, order the structure so that pointer fields occur first, then int
 # fields, and then char fields to provide the best packing.

-print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2)"
+print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2) &&
!defined(IN_TARGET_LIBS)"
 print ""
 print "/* Structure to save/restore optimization and target specific options. 
*/";
 print "struct cl_optimization GTY(())";


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2008-07-23 15:23 ` gnu at the-meissners dot org
@ 2008-07-23 15:33 ` hjl dot tools at gmail dot com
  2008-07-23 17:42 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 15:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2008-07-23 15:33 -------
(In reply to comment #6)
> 
> I didn't have objective c, java, or ADA on the system.  I'm going to kick off a
> build shortly with the following patch to see if it allows objc to build:
> 

I don't believe you need anything special to build Objective C and Java.
Please make sure that you don't disable them on purpose with

--enable-languages=c,c++

when you do testing. Please just don't use --enable-languages, at least
on Linux/x86.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2008-07-23 15:33 ` hjl dot tools at gmail dot com
@ 2008-07-23 17:42 ` pinskia at gcc dot gnu dot org
  2008-07-23 19:05 ` meissner at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-23 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2008-07-23 17:41 -------
(In reply to comment #4)
> It happens when building libobjc.

The real underlying issue with libobjc was recorded as PR 24775.  I have not
time to work on it lately though.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (7 preceding siblings ...)
  2008-07-23 17:42 ` pinskia at gcc dot gnu dot org
@ 2008-07-23 19:05 ` meissner at gcc dot gnu dot org
  2008-07-23 19:07 ` gnu at the-meissners dot org
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: meissner at gcc dot gnu dot org @ 2008-07-23 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from meissner at gcc dot gnu dot org  2008-07-23 19:04 -------
Subject: Bug 36907

Author: meissner
Date: Wed Jul 23 19:03:40 2008
New Revision: 138091

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138091
Log:
Fix PR 36907, breakage in building libobj with function specific changes

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/optc-gen.awk
    trunk/gcc/opth-gen.awk


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (8 preceding siblings ...)
  2008-07-23 19:05 ` meissner at gcc dot gnu dot org
@ 2008-07-23 19:07 ` gnu at the-meissners dot org
  2008-07-23 20:17 ` hjl dot tools at gmail dot com
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-23 19:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from gnu at the-meissners dot org  2008-07-23 19:06 -------
Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap

On Wed, Jul 23, 2008 at 01:46:30PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #4 from hjl dot tools at gmail dot com  2008-07-23 13:46 -------
> (In reply to comment #3)
> > The problem on Fedora 9/x86-64 may be due to FILE is undeclared in
> > 
> > extern void cl_optimization_print (FILE *, int, struct cl_optimization *);
> > extern void cl_target_option_print (FILE *, int, struct cl_target_option *);
> > 
> > in options.h.
> > 
> 
> It happens when building libobjc.
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36907
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.

I checked in the patch as revision 138091.  Sorry about the breakage.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (9 preceding siblings ...)
  2008-07-23 19:07 ` gnu at the-meissners dot org
@ 2008-07-23 20:17 ` hjl dot tools at gmail dot com
  2008-07-24 13:16 ` hjl dot tools at gmail dot com
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-23 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from hjl dot tools at gmail dot com  2008-07-23 20:16 -------
If you don't want to check/change every target, you should make
your changes to c-common.c optional. You only enable your changes
for those targets you know they work correctly.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (10 preceding siblings ...)
  2008-07-23 20:17 ` hjl dot tools at gmail dot com
@ 2008-07-24 13:16 ` hjl dot tools at gmail dot com
  2008-07-24 15:52 ` hjl dot tools at gmail dot com
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 13:16 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]



------- Comment #12 from hjl dot tools at gmail dot com  2008-07-24 13:15 -------
[hjl@gnu-12 gcc]$ cat bar.i
typedef __builtin_va_list __gnuc_va_list;
extern void warning (int, const char *, ...) __attribute__ ((__format__
(__printf__, 2, 3))) __attribute__ ((__nonnull__ (2))) __attribute__
((__cold__));
extern void foo (const char *, __gnuc_va_list);
void
warning (int opt __attribute__ ((__unused__)), const char *format, ...)
{
  __gnuc_va_list ap;

  __builtin_va_start(ap,format);
  foo (format, ap);
  __builtin_va_end(ap);
}
[hjl@gnu-12 gcc]$ ../prev-gcc/xgcc -B../prev-gcc/ -O -S bar.i
bar.i: In function âwarningâ:
bar.i:12: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-12 gcc]$


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (11 preceding siblings ...)
  2008-07-24 13:16 ` hjl dot tools at gmail dot com
@ 2008-07-24 15:52 ` hjl dot tools at gmail dot com
  2008-07-24 17:42 ` hjl dot tools at gmail dot com
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 15:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from hjl dot tools at gmail dot com  2008-07-24 15:51 -------
ia64_override_options has

  ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload;
  flag_schedule_insns_after_reload = 0;

If decode_options is called again without calling ia64_override_options,
ia64_flag_schedule_insns2 and flag_schedule_insns_after_reload may be
incorrect.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (12 preceding siblings ...)
  2008-07-24 15:52 ` hjl dot tools at gmail dot com
@ 2008-07-24 17:42 ` hjl dot tools at gmail dot com
  2008-07-24 17:49 ` hjl dot tools at gmail dot com
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from hjl dot tools at gmail dot com  2008-07-24 17:41 -------
The following targets are affected by revision 138075:

arm/arm.c:    flag_schedule_insns = flag_schedule_insns_after_reload = 0;
bfin/bfin.c:  bfin_flag_var_tracking = flag_var_tracking;
bfin/bfin.c:  bfin_flag_schedule_insns2 = flag_schedule_insns_after_reload;
i386/i386.c:    flag_schedule_insns_after_reload = flag_schedule_insns = 0;
ia64/ia64.c:  ia64_flag_var_tracking = flag_var_tracking;
ia64/ia64.c:  ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload;

Michael, I think your patch changes the x86 backend:

  /* When scheduling description is not available, disable scheduler pass
     so it won't slow down the compilation and make x87 code slower.  */
  if (!TARGET_SCHEDULE)
    flag_schedule_insns_after_reload = flag_schedule_insns = 0;

You may set flag_schedule_insns_after_reload and flag_schedule_insns
while they should be cleared.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (13 preceding siblings ...)
  2008-07-24 17:42 ` hjl dot tools at gmail dot com
@ 2008-07-24 17:49 ` hjl dot tools at gmail dot com
  2008-07-24 19:20 ` gnu at the-meissners dot org
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 17:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from hjl dot tools at gmail dot com  2008-07-24 17:49 -------
I don't think the middle-end should change optimization options
which have been overridden by the backend.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (14 preceding siblings ...)
  2008-07-24 17:49 ` hjl dot tools at gmail dot com
@ 2008-07-24 19:20 ` gnu at the-meissners dot org
  2008-07-24 19:33 ` hjl dot tools at gmail dot com
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-24 19:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from gnu at the-meissners dot org  2008-07-24 19:19 -------
Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap

On Thu, Jul 24, 2008 at 05:49:02PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #15 from hjl dot tools at gmail dot com  2008-07-24 17:49 -------
> I don't think the middle-end should change optimization options
> which have been overridden by the backend.
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36907
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.

I haven't done a bootstrap built yet, but could you try this patch on the
ia-64?  When I try it via a cross compiler, it works fine, but I wonder whether
random ports will do weird things (like leak memory) if OVERRIDE_OPTIONS is run
a second time.  I suspect we may need a macro that says whether it is safe to
run OVERRIDE_OPTIONS a second time.

2008-07-24  Michael Meissner  <gnu@the-meissners.org>

        * opts.c (decode_options): Rerun OVERRIDE_OPTIONS when being run a
        second time to allow the backend to override the default options.

Index: gcc/opts.c
===================================================================
--- gcc/opts.c  (revision 138117)
+++ gcc/opts.c  (working copy)
@@ -1066,6 +1066,12 @@ decode_options (unsigned int argc, const
       flag_unwind_tables = targetm.unwind_tables_default;
     }

+#ifdef OVERRIDE_OPTIONS
+  /* Some machines may reject certain combinations of options.  */
+  if (! first_time_p)
+    OVERRIDE_OPTIONS;
+#endif
+
 #ifdef OPTIMIZATION_OPTIONS
   /* Allow default optimizations to be specified on a per-machine basis.  */
   OPTIMIZATION_OPTIONS (optimize, optimize_size);


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (15 preceding siblings ...)
  2008-07-24 19:20 ` gnu at the-meissners dot org
@ 2008-07-24 19:33 ` hjl dot tools at gmail dot com
  2008-07-24 20:11 ` gnu at the-meissners dot org
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 19:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from hjl dot tools at gmail dot com  2008-07-24 19:32 -------
(In reply to comment #16)
> I haven't done a bootstrap built yet, but could you try this patch on the
> ia-64?  When I try it via a cross compiler, it works fine, but I wonder whether
> random ports will do weird things (like leak memory) if OVERRIDE_OPTIONS is run
> a second time.  I suspect we may need a macro that says whether it is safe to
> run OVERRIDE_OPTIONS a second time.
> 
> 2008-07-24  Michael Meissner  <gnu@the-meissners.org>
> 
>         * opts.c (decode_options): Rerun OVERRIDE_OPTIONS when being run a
>         second time to allow the backend to override the default options.
> 

Taking a look at override_options in i386.c, I am not sure
running it more than once is a good idea.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (16 preceding siblings ...)
  2008-07-24 19:33 ` hjl dot tools at gmail dot com
@ 2008-07-24 20:11 ` gnu at the-meissners dot org
  2008-07-24 20:15 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-24 20:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from gnu at the-meissners dot org  2008-07-24 20:11 -------
Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap

On Thu, Jul 24, 2008 at 07:33:01PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #17 from hjl dot tools at gmail dot com  2008-07-24 19:32 -------
> (In reply to comment #16)
> > I haven't done a bootstrap built yet, but could you try this patch on the
> > ia-64?  When I try it via a cross compiler, it works fine, but I wonder whether
> > random ports will do weird things (like leak memory) if OVERRIDE_OPTIONS is run
> > a second time.  I suspect we may need a macro that says whether it is safe to
> > run OVERRIDE_OPTIONS a second time.
> > 
> > 2008-07-24  Michael Meissner  <gnu@the-meissners.org>
> > 
> >         * opts.c (decode_options): Rerun OVERRIDE_OPTIONS when being run a
> >         second time to allow the backend to override the default options.
> > 
> 
> Taking a look at override_options in i386.c, I am not sure
> running it more than once is a good idea.

Yes, I came to the same conclusion when trying a bootstrap.  This patch adds a
new SECONDARY_OVERRIDE_OPTION to be run in the recursive case, and defined it
in the ia64.

2008-07-24  Michael Meissner  <gnu@the-meissners.org>

        * opts.c (decode_options): Run SECONDARY_OVERRIDE_OPTIONS if it is
        defined when being run a second time to allow the backend to
        override the default options.

        * config/ia64/ia64.h (SECONDARY_OVERRIDE_OPTIONS): Define to be
        the same as OVERRIDE_OPTIONS.

        * doc/tm.texi (SECONDARY_OVERRIDE_OPTIONS): Document.

Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi     (revision 138117)
+++ gcc/doc/tm.texi     (working copy)
@@ -814,6 +814,12 @@ Don't use this macro to turn on various 
 @option{-O}.  That is what @code{OPTIMIZATION_OPTIONS} is for.
 @end defmac

+@defmac SECONDARY_OVERRIDE_OPTIONS
+This is similar to @code{OVERRIDE_OPTIONS} but it is run after the
+compiler processes the @code{optimize}, @code{hot}, or @code{cold}
+attributes to change the optimization options.
+@end defmac
+
 @defmac C_COMMON_OVERRIDE_OPTIONS
 This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C
 language frontends (C, Objective-C, C++, Objective-C++) and so can be
Index: gcc/opts.c
===================================================================
--- gcc/opts.c  (revision 138117)
+++ gcc/opts.c  (working copy)
@@ -1066,6 +1066,12 @@ decode_options (unsigned int argc, const
       flag_unwind_tables = targetm.unwind_tables_default;
     }

+#ifdef SECONDARY_OVERRIDE_OPTIONS
+  /* Some machines may reject certain combinations of options.  */
+  if (! first_time_p)
+    SECONDARY_OVERRIDE_OPTIONS;
+#endif
+
 #ifdef OPTIMIZATION_OPTIONS
   /* Allow default optimizations to be specified on a per-machine basis.  */
   OPTIMIZATION_OPTIONS (optimize, optimize_size);
Index: gcc/config/ia64/ia64.h
===================================================================
--- gcc/config/ia64/ia64.h      (revision 138117)
+++ gcc/config/ia64/ia64.h      (working copy)
@@ -121,6 +121,11 @@ extern enum processor_type ia64_tune;

 #define OVERRIDE_OPTIONS ia64_override_options ()

+/* Like OVERRIDE_OPTIONS, but run after the optimize, hot, or cold attributes
+   are processed.  */
+
+#define SECONDARY_OVERRIDE_OPTIONS ia64_override_options ()
+
 /* Some machines may desire to change what optimizations are performed for
    various optimization levels.  This macro, if defined, is executed once just
    after the optimization level is determined and before the remainder of the


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (17 preceding siblings ...)
  2008-07-24 20:11 ` gnu at the-meissners dot org
@ 2008-07-24 20:15 ` hjl dot tools at gmail dot com
  2008-07-24 20:22 ` gnu at the-meissners dot org
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 20:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from hjl dot tools at gmail dot com  2008-07-24 20:14 -------
(In reply to comment #18)
> Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap
> 
> Yes, I came to the same conclusion when trying a bootstrap.  This patch adds a
> new SECONDARY_OVERRIDE_OPTION to be run in the recursive case, and defined it
> in the ia64.
> 

Don't we also need it for i386 to handle

  /* When scheduling description is not available, disable scheduler pass
     so it won't slow down the compilation and make x87 code slower.  */
  if (!TARGET_SCHEDULE)
    flag_schedule_insns_after_reload = flag_schedule_insns = 0;


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (18 preceding siblings ...)
  2008-07-24 20:15 ` hjl dot tools at gmail dot com
@ 2008-07-24 20:22 ` gnu at the-meissners dot org
  2008-07-24 20:30 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: gnu at the-meissners dot org @ 2008-07-24 20:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from gnu at the-meissners dot org  2008-07-24 20:21 -------
Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap

On Thu, Jul 24, 2008 at 08:14:35PM -0000, hjl dot tools at gmail dot com wrote:
> 
> 
> ------- Comment #19 from hjl dot tools at gmail dot com  2008-07-24 20:14 -------
> (In reply to comment #18)
> > Subject: Re:  [4.4 Regression]: Gcc failed to bootstrap
> > 
> > Yes, I came to the same conclusion when trying a bootstrap.  This patch adds a
> > new SECONDARY_OVERRIDE_OPTION to be run in the recursive case, and defined it
> > in the ia64.
> > 
> 
> Don't we also need it for i386 to handle
> 
>   /* When scheduling description is not available, disable scheduler pass
>      so it won't slow down the compilation and make x87 code slower.  */
>   if (!TARGET_SCHEDULE)
>     flag_schedule_insns_after_reload = flag_schedule_insns = 0;

You are right those should be added.


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (19 preceding siblings ...)
  2008-07-24 20:22 ` gnu at the-meissners dot org
@ 2008-07-24 20:30 ` hjl dot tools at gmail dot com
  2008-07-27 18:59 ` hjl dot tools at gmail dot com
  2008-08-17  0:09 ` pinskia at gcc dot gnu dot org
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-24 20:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from hjl dot tools at gmail dot com  2008-07-24 20:29 -------
(In reply to comment #18)
>
> 
> +#ifdef SECONDARY_OVERRIDE_OPTIONS
> +  /* Some machines may reject certain combinations of options.  */
> +  if (! first_time_p)
> +    SECONDARY_OVERRIDE_OPTIONS;
> +#endif
> +
>  #ifdef OPTIMIZATION_OPTIONS
>    /* Allow default optimizations to be specified on a per-machine basis.  */
>    OPTIMIZATION_OPTIONS (optimize, optimize_size);
> Index: gcc/config/ia64/ia64.h
> ===================================================================
> --- gcc/config/ia64/ia64.h      (revision 138117)
> +++ gcc/config/ia64/ia64.h      (working copy)
> @@ -121,6 +121,11 @@ extern enum processor_type ia64_tune;
> 
>  #define OVERRIDE_OPTIONS ia64_override_options ()
> 
> +/* Like OVERRIDE_OPTIONS, but run after the optimize, hot, or cold attributes
> +   are processed.  */
> +
> +#define SECONDARY_OVERRIDE_OPTIONS ia64_override_options ()
> +

I think we should just do

#ifdef SECONDARY_OVERRIDE_OPTIONS
  /* Some machines may reject certain combinations of options.  */
  SECONDARY_OVERRIDE_OPTIONS;
#endif

#define SECONDARY_OVERRIDE_OPTIONS ia64_secondary_override_options ()



void
ia64_override_options (void)
{
  if (TARGET_AUTO_PIC)
    target_flags |= MASK_CONST_GP;

  if (TARGET_INLINE_SQRT == INL_MIN_LAT)
    {    
      warning (0, "not yet implemented: latency-optimized inline square root");
      TARGET_INLINE_SQRT = INL_MAX_THR;
    }      

   ia64_section_threshold = g_switch_set ? g_switch_value :
IA64_DEFAULT_GVALUE;

  init_machine_status = ia64_init_machine_status;
}

void
ia64_secondary_override_options ()
{
  ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload;
  flag_schedule_insns_after_reload = 0;
}


-- 


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (20 preceding siblings ...)
  2008-07-24 20:30 ` hjl dot tools at gmail dot com
@ 2008-07-27 18:59 ` hjl dot tools at gmail dot com
  2008-08-17  0:09 ` pinskia at gcc dot gnu dot org
  22 siblings, 0 replies; 24+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-07-27 18:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from hjl dot tools at gmail dot com  2008-07-27 18:59 -------
Fixed by revision 138154.


-- 

hjl dot tools at gmail dot com changed:

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


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


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

* [Bug bootstrap/36907] [4.4 Regression]: Gcc failed to bootstrap
  2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
                   ` (21 preceding siblings ...)
  2008-07-27 18:59 ` hjl dot tools at gmail dot com
@ 2008-08-17  0:09 ` pinskia at gcc dot gnu dot org
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-17  0:09 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

end of thread, other threads:[~2008-08-17  0:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-23 11:33 [Bug bootstrap/36907] New: [4.4 Regression]: Gcc failed to bootstrap hjl dot tools at gmail dot com
2008-07-23 12:41 ` [Bug bootstrap/36907] " hjl dot tools at gmail dot com
2008-07-23 13:29 ` hjl dot tools at gmail dot com
2008-07-23 13:39 ` hjl dot tools at gmail dot com
2008-07-23 13:47 ` hjl dot tools at gmail dot com
2008-07-23 14:32 ` hjl dot tools at gmail dot com
2008-07-23 15:23 ` gnu at the-meissners dot org
2008-07-23 15:33 ` hjl dot tools at gmail dot com
2008-07-23 17:42 ` pinskia at gcc dot gnu dot org
2008-07-23 19:05 ` meissner at gcc dot gnu dot org
2008-07-23 19:07 ` gnu at the-meissners dot org
2008-07-23 20:17 ` hjl dot tools at gmail dot com
2008-07-24 13:16 ` hjl dot tools at gmail dot com
2008-07-24 15:52 ` hjl dot tools at gmail dot com
2008-07-24 17:42 ` hjl dot tools at gmail dot com
2008-07-24 17:49 ` hjl dot tools at gmail dot com
2008-07-24 19:20 ` gnu at the-meissners dot org
2008-07-24 19:33 ` hjl dot tools at gmail dot com
2008-07-24 20:11 ` gnu at the-meissners dot org
2008-07-24 20:15 ` hjl dot tools at gmail dot com
2008-07-24 20:22 ` gnu at the-meissners dot org
2008-07-24 20:30 ` hjl dot tools at gmail dot com
2008-07-27 18:59 ` hjl dot tools at gmail dot com
2008-08-17  0:09 ` pinskia at gcc dot gnu dot 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).