public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/46050] New: gcc/c-parser.c fails to build with -O2 -finline-functions
@ 2010-10-16 16:11 baryluk at smp dot if.uj.edu.pl
  2010-10-16 16:23 ` [Bug bootstrap/46050] " ubizjak at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: baryluk at smp dot if.uj.edu.pl @ 2010-10-16 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: gcc/c-parser.c fails to build with -O2
                    -finline-functions
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: baryluk@smp.if.uj.edu.pl


gcc-4.6-20101009 snapshot. I think it was working in previous snapshot (there
were other errors, but this no). With only -O2 build is ok. So inlineing is a
problem?



root@tytus:/scratch/obiekty# export FLAGS="-O2 -finline-functions"
root@tytus:/scratch/obiekty# export CFLAGS=$FLAGS
root@tytus:/scratch/obiekty# export CXXFLAGS=$FLAGS
root@tytus:/scratch/obiekty#  /scratch/gcc-4.6-20101009/configure \
    --enable-languages=c,c++,java \
    --enable-checking=yes \
    CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
root@tytus:/scratch/obiekty# make "BOOT_CFLAGS=$CFLAGS" bootstrap


...

/scratch/obiekty/./prev-gcc/xgcc -B/scratch/obiekty/./prev-gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/bin/
-B/usr/local/i686-pc-linux-gnu/lib/ -isystem
/usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include    -c  -DIN_GCC_FRONTEND -O2
-finline-functions -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I.
-I/scratch/gcc-4.6-20101009/gcc -I/scratch/gcc-4.6-20101009/gcc/.
-I/scratch/gcc-4.6-20101009/gcc/../include
-I/scratch/gcc-4.6-20101009/gcc/../libcpp/include 
-I/scratch/gcc-4.6-20101009/gcc/../libdecnumber
-I/scratch/gcc-4.6-20101009/gcc/../libdecnumber/bid -I../libdecnumber 
-DCLOOG_PPL_BACKEND  -I/usr/include/libelf 
/scratch/gcc-4.6-20101009/gcc/c-parser.c -o c-parser.o
/scratch/gcc-4.6-20101009/gcc/c-parser.c: In function
‘c_parser_statement_after_labels’:
/scratch/gcc-4.6-20101009/gcc/c-parser.c:4672:19: error: ‘incr’ may be used
uninitialized in this function [-Werror=uninitialized]
/scratch/gcc-4.6-20101009/gcc/c-parser.c:4525:21: note: ‘incr’ was declared
here
cc1: all warnings being treated as errors

make[3]: *** [c-parser.o] Błąd 1
make[3]: Opuszczenie katalogu `/scratch/obiekty/gcc'
make[2]: *** [all-stage2-gcc] Błąd 2
make[2]: Opuszczenie katalogu `/scratch/obiekty'
make[1]: *** [stage2-bubble] Błąd 2
make[1]: Opuszczenie katalogu `/scratch/obiekty'
make: *** [bootstrap] Błąd 2
root@tytus:/scratch/obiekty#


Thanks.


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

* [Bug bootstrap/46050] gcc/c-parser.c fails to build with -O2 -finline-functions
  2010-10-16 16:11 [Bug bootstrap/46050] New: gcc/c-parser.c fails to build with -O2 -finline-functions baryluk at smp dot if.uj.edu.pl
@ 2010-10-16 16:23 ` ubizjak at gmail dot com
  2010-10-17 12:16 ` baryluk at smp dot if.uj.edu.pl
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2010-10-16 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2010-10-16 16:23:14 UTC ---
Created attachment 22063
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22063
move some initializations

Does attached patch fix the failure for you?


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

* [Bug bootstrap/46050] gcc/c-parser.c fails to build with -O2 -finline-functions
  2010-10-16 16:11 [Bug bootstrap/46050] New: gcc/c-parser.c fails to build with -O2 -finline-functions baryluk at smp dot if.uj.edu.pl
  2010-10-16 16:23 ` [Bug bootstrap/46050] " ubizjak at gmail dot com
@ 2010-10-17 12:16 ` baryluk at smp dot if.uj.edu.pl
  2010-10-17 12:18 ` baryluk at smp dot if.uj.edu.pl
  2010-10-17 18:01 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: baryluk at smp dot if.uj.edu.pl @ 2010-10-17 12:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Witold Baryluk <baryluk at smp dot if.uj.edu.pl> 2010-10-17 12:16:25 UTC ---
Not exactly your patch. In true-branch of if, there is no assigment to incr (so
error is correct).

But moving else assigments, before if, resolves problem. Modified patch agains
snapshot 20101009 attached.

If you have been genereting against SVN trunk, that it is possible that it is
already fixed there (as comment in your patch indicates also).


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

* [Bug bootstrap/46050] gcc/c-parser.c fails to build with -O2 -finline-functions
  2010-10-16 16:11 [Bug bootstrap/46050] New: gcc/c-parser.c fails to build with -O2 -finline-functions baryluk at smp dot if.uj.edu.pl
  2010-10-16 16:23 ` [Bug bootstrap/46050] " ubizjak at gmail dot com
  2010-10-17 12:16 ` baryluk at smp dot if.uj.edu.pl
@ 2010-10-17 12:18 ` baryluk at smp dot if.uj.edu.pl
  2010-10-17 18:01 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: baryluk at smp dot if.uj.edu.pl @ 2010-10-17 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Witold Baryluk <baryluk at smp dot if.uj.edu.pl> 2010-10-17 12:18:15 UTC ---
Created attachment 22069
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22069
Move initializations patch of incr and cond (against gcc-4.6-20101009)


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

* [Bug bootstrap/46050] gcc/c-parser.c fails to build with -O2 -finline-functions
  2010-10-16 16:11 [Bug bootstrap/46050] New: gcc/c-parser.c fails to build with -O2 -finline-functions baryluk at smp dot if.uj.edu.pl
                   ` (2 preceding siblings ...)
  2010-10-17 12:18 ` baryluk at smp dot if.uj.edu.pl
@ 2010-10-17 18:01 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2010-10-17 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

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

--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2010-10-17 18:00:58 UTC ---
(In reply to comment #2)
> Not exactly your patch. In true-branch of if, there is no assigment to incr (so
> error is correct).
> 
> But moving else assigments, before if, resolves problem. Modified patch agains
> snapshot 20101009 attached.
> 
> If you have been genereting against SVN trunk, that it is possible that it is
> already fixed there (as comment in your patch indicates also).

Yeah, my patch was against latest SVN trunk. But anyway, an assignment in both
arms on an if can surely be CSE'd out of the "if" entirely.

So, fixed in latest SVN.


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

end of thread, other threads:[~2010-10-17 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-16 16:11 [Bug bootstrap/46050] New: gcc/c-parser.c fails to build with -O2 -finline-functions baryluk at smp dot if.uj.edu.pl
2010-10-16 16:23 ` [Bug bootstrap/46050] " ubizjak at gmail dot com
2010-10-17 12:16 ` baryluk at smp dot if.uj.edu.pl
2010-10-17 12:18 ` baryluk at smp dot if.uj.edu.pl
2010-10-17 18:01 ` ubizjak at gmail dot com

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