public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
@ 2011-10-17 13:38 dominiq at lps dot ens.fr
  2011-10-17 14:35 ` [Bug bootstrap/50758] " howarth at nitro dot med.uc.edu
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-17 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50758
           Summary: [4.7 Regression] Bootstrap fails at stage 2 on
                    x86_64-apple-darwin10: error: variable 'token_no' set
                    but not used
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: dodji@gcc.gnu.org


At revision 180087 bootstrap fails at stage 2 on x86_64-apple-darwin10:

/opt/gcc/build_w/./prev-gcc/g++ -B/opt/gcc/build_w/./prev-gcc/
-B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.8.0/bin/ -nostdinc++
-B/opt/gcc/build_w/prev-x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-B/opt/gcc/build_w/prev-x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs
-I/opt/gcc/build_w/prev-x86_64-apple-darwin10.8.0/libstdc++-v3/include/x86_64-apple-darwin10.8.0
-I/opt/gcc/build_w/prev-x86_64-apple-darwin10.8.0/libstdc++-v3/include
-I/opt/gcc/work/libstdc++-v3/libsupc++
-L/opt/gcc/build_w/prev-x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-L/opt/gcc/build_w/prev-x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs 
-I../../work/libcpp -I. -I../../work/libcpp/../include
-I../../work/libcpp/include -I/opt/sw64/include -g -O2 -mdynamic-no-pic
-gtoggle -W -Wall -Wwrite-strings -Wmissing-format-attribute -pedantic
-Wno-long-long -Werror -I../../work/libcpp -I. -I../../work/libcpp/../include
-I../../work/libcpp/include -I/opt/sw64/include -c -o line-map.o -MT line-map.o
-MMD -MP -MF .deps/line-map.Tpo ../../work/libcpp/line-map.c
../../work/libcpp/line-map.c: In function 'source_location
linemap_macro_map_loc_to_exp_point(const line_map*, source_location)':
../../work/libcpp/line-map.c:628:12: error: variable 'token_no' set but not
used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

This code was introduced at revision 180081.
AFAIU the code, the warning seems bogus.


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
@ 2011-10-17 14:35 ` howarth at nitro dot med.uc.edu
  2011-10-17 15:12 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-10-17 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #1 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-10-17 14:34:30 UTC ---
I don't see this issue at r180087 on x86_64-apple-darwin11 with...

../gcc-4.7-20111017/configure --prefix=/sw --prefix=/sw/lib/gcc4.7
--mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info
--with-build-config=bootstrap-lto --enable-stage1-languages=c,lto
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--program-suffix=-fsf-4.7 --enable-checking=yes --enable-cloog-backend=isl

and an lto-bootstrap.


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
  2011-10-17 14:35 ` [Bug bootstrap/50758] " howarth at nitro dot med.uc.edu
@ 2011-10-17 15:12 ` rguenth at gcc dot gnu.org
  2011-10-17 15:27 ` dodji at seketeli dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-17 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-17
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-17 15:12:20 UTC ---
Confirmed.


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
  2011-10-17 14:35 ` [Bug bootstrap/50758] " howarth at nitro dot med.uc.edu
  2011-10-17 15:12 ` rguenth at gcc dot gnu.org
@ 2011-10-17 15:27 ` dodji at seketeli dot org
  2011-10-17 15:42 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dodji at seketeli dot org @ 2011-10-17 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from dodji at seketeli dot org <dodji at seketeli dot org> 2011-10-17 15:26:54 UTC ---
Are you still seing this with commit r180090?


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2011-10-17 15:27 ` dodji at seketeli dot org
@ 2011-10-17 15:42 ` dominiq at lps dot ens.fr
  2011-10-17 15:56 ` dodji at seketeli dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-17 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-17 15:42:09 UTC ---
> Are you still seing this with commit r180090?

I have bootstrapped revision 180087 with the following patch

--- /opt/gcc/_clean/libcpp/line-map.c    2011-10-17 12:04:41.000000000 +0200
+++ /opt/gcc/work/libcpp/line-map.c    2011-10-17 15:36:30.000000000 +0200
@@ -625,7 +625,7 @@ source_location
 linemap_macro_map_loc_to_exp_point (const struct line_map *map,
                     source_location location)
 {
-  unsigned token_no;
+  unsigned token_no __attribute__ ((__unused__));

   linemap_assert (linemap_macro_expansion_map_p (map)
           && location >= MAP_START_LOCATION (map));

I guess that revision 180090 is a similar fix that should work (I'll have the
answer in a couple hours;-).

Last question: is the warning bogus or not? If no, why? If yes, I'll open a new
PR.


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2011-10-17 15:42 ` dominiq at lps dot ens.fr
@ 2011-10-17 15:56 ` dodji at seketeli dot org
  2011-10-17 19:40 ` dominiq at lps dot ens.fr
  2011-10-17 19:57 ` dominiq at lps dot ens.fr
  6 siblings, 0 replies; 8+ messages in thread
From: dodji at seketeli dot org @ 2011-10-17 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from dodji at seketeli dot org <dodji at seketeli dot org> 2011-10-17 15:56:05 UTC ---
"dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> a écrit:

> I guess that revision 180090 is a similar fix that should work (I'll
> have the answer in a couple hours;-).

OK, thanks.

> Last question: is the warning bogus or not? If no, why? If yes, I'll
> open a new PR.

The warning is not bogus when you are compiling with --disable-checking
or when your GCC_VERSION is < 2007.  This is because the way
linemap_assert is defined:

    /* Assertion macro to be used in line-map code.  */
    #define linemap_assert(EXPR)            \
      do {                        \
        if (! (EXPR))                \
          abort ();                    \
      } while (0)

    /* Assert that MAP encodes locations of tokens that are not part of
       the replacement-list of a macro expansion.  */
    #define linemap_check_ordinary(LINE_MAP) __extension__        \
      ({linemap_assert (!linemap_macro_expansion_map_p (LINE_MAP)); \
        (LINE_MAP);})
    #else
    #define linemap_assert(EXPR)
    #define linemap_check_ordinary(LINE_MAP) (LINE_MAP)
    #endif

In those cases token_no is not used.  Hence the fix committed to
revision 180090.

Sorry for the inconvenience.


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2011-10-17 15:56 ` dodji at seketeli dot org
@ 2011-10-17 19:40 ` dominiq at lps dot ens.fr
  2011-10-17 19:57 ` dominiq at lps dot ens.fr
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-17 19:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-17 19:40:06 UTC ---
> The warning is not bogus when you are compiling with --disable-checking
> or when your GCC_VERSION is < 2007.  ...

I am using

../work/configure --prefix=/opt/gcc/gcc4.7w
--enable-languages=c,c++,fortran,objc,obj-c++,java,ada,lto --with-gmp=/opt/sw64
--with-libiconv-prefix=/opt/sw64 --with-system-zlib --with-cloog=/opt/sw64
--enable-cloog-backend=isl --enable-lto

so no --disable-checking and the bootstrap gcc is

configure:4007: gcc --version >&5
gcc (GCC) 4.5.3 20110419 for GNAT GPL 2011 (20110419)

What am I missing?


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

* [Bug bootstrap/50758] [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used
  2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2011-10-17 19:40 ` dominiq at lps dot ens.fr
@ 2011-10-17 19:57 ` dominiq at lps dot ens.fr
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-17 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-17 19:56:33 UTC ---
BTW bootstrap finished on x86_64-apple-darwin10 and line-map.c compiled at
stage2 on powerpc-apple-darwin9, both at revision 180100. Thanks for the patch.
Closing as fixed.


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

end of thread, other threads:[~2011-10-17 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-17 13:38 [Bug bootstrap/50758] New: [4.7 Regression] Bootstrap fails at stage 2 on x86_64-apple-darwin10: error: variable 'token_no' set but not used dominiq at lps dot ens.fr
2011-10-17 14:35 ` [Bug bootstrap/50758] " howarth at nitro dot med.uc.edu
2011-10-17 15:12 ` rguenth at gcc dot gnu.org
2011-10-17 15:27 ` dodji at seketeli dot org
2011-10-17 15:42 ` dominiq at lps dot ens.fr
2011-10-17 15:56 ` dodji at seketeli dot org
2011-10-17 19:40 ` dominiq at lps dot ens.fr
2011-10-17 19:57 ` dominiq at lps dot ens.fr

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