public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time
@ 2005-03-25  5:45 halcy0n at gentoo dot org
  2005-03-25  5:48 ` [Bug tree-optimization/20634] " halcy0n at gentoo dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: halcy0n at gentoo dot org @ 2005-03-25  5:45 UTC (permalink / raw)
  To: gcc-bugs

The package I'm trying to compile with the latest snapshot of GCC is sudo.  It
compiles with -O2, but when running it, it does not work properly.  Adding
-fno-unit-at-a-time fixes the runtime issue.  Also the program works fine if
compiled with -O1.  So I took all of the -O2 options and put them on the command
line along with -O1.  The program fails to compile now with the following error:

i686-pc-linux-gnu-gcc -c -I. -I.  -O1 -pipe -fthread-jumps -fcrossjumping
-foptimize-sibling-calls -fcse-follow-jumps  -fcse-skip-blocks -fgcse  -fgcse-lm
-fexpensive-optimizations -fstrength-reduce -frerun-cse-after-loop 
-frerun-loop-opt -fcaller-saves -fforce-mem -fpeephole2 -fschedule-insns 
-fschedule-insns2 -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing
-fdelete-null-pointer-checks -freorder-blocks  -freorder-functions
-funit-at-a-time -falign-functions  -falign-jumps -falign-loops -falign-labels
-ftree-pre -D_PATH_SUDOERS=\"/etc/sudoers\"
-D_PATH_SUDOERS_TMP=\"/etc/sudoers.tmp\" -DSUDOERS_UID=0 -DSUDOERS_GID=0
-DSUDOERS_MODE=0440  sudo.tab.c
parse.yacc: In function 'append':
parse.yacc:1132: error: unable to find a register to spill in class 'CREG'
parse.yacc:1132: error: this is the insn:
(insn:HI 18 5 23 0 (parallel [
            (set (reg:SI 0 ax [70])
                (unspec:SI [
                        (mem:BLK (reg/v/f:SI 64 [ src ]) [0 A8])
                        (reg:QI 74)
                        (const_int 1 [0x1])
                        (reg:SI 73)
                    ] 20))
            (use (reg:SI 19 dirflag))
            (clobber (reg/f:SI 5 di [orig:72 src ] [72]))
            (clobber (reg:CC 17 flags))
        ]) 463 {*strlenqi_1} (insn_list:REG_DEP_TRUE 16 (insn_list:REG_DEP_TRUE
14 (insn_list:REG_DEP_TRUE 4 (insn_list:REG_DEP_TRUE 17 (nil)))))
    (expr_list:REG_DEAD (reg:SI 19 dirflag)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_UNUSED (reg/f:SI 5 di [orig:72 src ] [72])
                (expr_list:REG_EQUAL (unspec:SI [
                            (mem:BLK (reg/v/f:SI 64 [ src ]) [0 A8])
                            (reg:QI 74)
                            (const_int 1 [0x1])
                            (reg:SI 73)
                        ] 20)
                    (nil))))))
parse.yacc:1132: confused by earlier errors, bailing out

Taking -funit-at-a-time out allows it to compile fine.

nest sudo-1.6.7p5 # gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/mnt/ftp/temp/portage/gcc-4.0.0_beta20050319/work/gcc-4.0-20050319/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.0.0-beta20050319
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.0.0-beta20050319/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.0-beta20050319
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.0-beta20050319/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.0-beta20050319/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.0.0-beta20050319/include/g++-v4
--host=i686-pc-linux-gnu --disable-altivec --enable-nls
--without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.0.0-beta20050319 (Gentoo Linux 4.0.0_beta20050319)

-- 
           Summary: 4.0 regression - code fails to compile/code generation
                    issue with -funit-at-a-time
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: halcy0n at gentoo dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/20634] 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
@ 2005-03-25  5:48 ` halcy0n at gentoo dot org
  2005-03-25 14:04 ` [Bug tree-optimization/20634] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: halcy0n at gentoo dot org @ 2005-03-25  5:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From halcy0n at gentoo dot org  2005-03-25 05:48 -------
Created an attachment (id=8454)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8454&action=view)
Preprocessed file for above failure


-- 


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


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

* [Bug tree-optimization/20634] code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
  2005-03-25  5:48 ` [Bug tree-optimization/20634] " halcy0n at gentoo dot org
@ 2005-03-25 14:04 ` pinskia at gcc dot gnu dot org
  2005-03-25 14:51 ` [Bug rtl-optimization/20634] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-25 14:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-25 14:03 -------
I want to say this is the normal -fschedule-insns problem on i686-pc-linux-gnu which is known to 
cause problems.  There is another bug about the same issue.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|                            |i686-pc-linux-gnu
           Keywords|                            |ice-on-valid-code
            Summary|4.0 regression - code fails |code fails to compile/code
                   |to compile/code generation  |generation issue with -
                   |issue with -funit-at-a-time |funit-at-a-time


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


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

* [Bug rtl-optimization/20634] code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
  2005-03-25  5:48 ` [Bug tree-optimization/20634] " halcy0n at gentoo dot org
  2005-03-25 14:04 ` [Bug tree-optimization/20634] " pinskia at gcc dot gnu dot org
@ 2005-03-25 14:51 ` pinskia at gcc dot gnu dot org
  2005-03-26 18:21 ` [Bug target/20634] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-25 14:51 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |rtl-optimization


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


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

* [Bug target/20634] code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
                   ` (2 preceding siblings ...)
  2005-03-25 14:51 ` [Bug rtl-optimization/20634] " pinskia at gcc dot gnu dot org
@ 2005-03-26 18:21 ` pinskia at gcc dot gnu dot org
  2005-03-26 18:22 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-26 18:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |target


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


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

* [Bug target/20634] code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
                   ` (3 preceding siblings ...)
  2005-03-26 18:21 ` [Bug target/20634] " pinskia at gcc dot gnu dot org
@ 2005-03-26 18:22 ` pinskia at gcc dot gnu dot org
  2005-03-26 21:09 ` halcy0n at gentoo dot org
  2005-04-14 18:02 ` belyshev at depni dot sinp dot msu dot ru
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-26 18:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-26 18:22 -------
For the first problem with code generation issue, does -fno-strict-aliasing helps?

For the second problem with respect with the ICE, well only -O1 -fschedule-insns -funit-at-a-time is 
needed to reproduce the problem.

-- 


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


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

* [Bug target/20634] code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
                   ` (4 preceding siblings ...)
  2005-03-26 18:22 ` pinskia at gcc dot gnu dot org
@ 2005-03-26 21:09 ` halcy0n at gentoo dot org
  2005-04-14 18:02 ` belyshev at depni dot sinp dot msu dot ru
  6 siblings, 0 replies; 8+ messages in thread
From: halcy0n at gentoo dot org @ 2005-03-26 21:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From halcy0n at gentoo dot org  2005-03-26 21:09 -------
(In reply to comment #3)
> For the first problem with code generation issue, does -fno-strict-aliasing helps?

No, same problem still.  Only adding -fno-unit-at-a-time fixes the issue.  I
should add that it works fine with gcc 3.4 and -funit-at-a-time.

> For the second problem with respect with the ICE, well only -O1
-fschedule-insns -funit-at-a-time is 
> needed to reproduce the problem.

Yes, I get the ICE with only these options.

-- 


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


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

* [Bug target/20634] code fails to compile/code generation issue with -funit-at-a-time
  2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
                   ` (5 preceding siblings ...)
  2005-03-26 21:09 ` halcy0n at gentoo dot org
@ 2005-04-14 18:02 ` belyshev at depni dot sinp dot msu dot ru
  6 siblings, 0 replies; 8+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-04-14 18:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  2005-04-14 18:02 -------
reduced testcase, compile with '-O1 -fschedule-insns -funit-at-a-time',
fails with 3.3-hammer, 3.4, 4.0 and mainline, introduced in 2003:
: Search converges between 2003-07-11-trunk (#291) and 2003-07-12-trunk (#292).

------------------------------------------------------------------------------
unsigned int strlen (const char *);

static void append (char *p0, char **pp, int *j, char *p1)
{
  int k = strlen (p0);

  if (p1 && pp)
    k += strlen (p1);
  
  if (*j + k)
    while (*j);
}

int yyparse (int foo)
{
  if (foo)
    append (0, 0, 0, 0);
  else 
    append (0, 0, 0, 0);
}
------------------------------------------------------------------------------

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-14 18:02:56
               date|                            |


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


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

end of thread, other threads:[~2005-04-14 18:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-25  5:45 [Bug tree-optimization/20634] New: 4.0 regression - code fails to compile/code generation issue with -funit-at-a-time halcy0n at gentoo dot org
2005-03-25  5:48 ` [Bug tree-optimization/20634] " halcy0n at gentoo dot org
2005-03-25 14:04 ` [Bug tree-optimization/20634] " pinskia at gcc dot gnu dot org
2005-03-25 14:51 ` [Bug rtl-optimization/20634] " pinskia at gcc dot gnu dot org
2005-03-26 18:21 ` [Bug target/20634] " pinskia at gcc dot gnu dot org
2005-03-26 18:22 ` pinskia at gcc dot gnu dot org
2005-03-26 21:09 ` halcy0n at gentoo dot org
2005-04-14 18:02 ` belyshev at depni dot sinp dot msu dot ru

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).