public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target
@ 2012-11-19 21:36 sje at gcc dot gnu.org
  2012-11-19 22:55 ` [Bug pch/55399] " joseph at codesourcery dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2012-11-19 21:36 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55399
           Summary: pch tests fail on mips-mti-linux-gnu target
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: pch
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sje@gcc.gnu.org
                CC: joseph@codesourcery.com


Starting with r192715 a large number (almost all) of the pch tests started
failing on the mips-mti-linux-gnu target.  I have verified that they pass using
r192714.

I think the problem has something to do with when/where/if pch_cpp_save_state()
is called but I am not sure.  I noticed that done_preinclude is an
uninitialized
global variable, but explicitly initializing it to false did not fix the
problem.

I have no idea why this would not be affecting other targets as I don't see any
MIPS specific changes in this patch but I have not seen it on other targets.

The patch that caused the regression is mostly in libcpp:

2012-10-23  Joseph Myers  <joseph@codesourcery.com>

    * files.c (struct _cpp_file): Add implicit_preinclude.
    (pch_open_file): Allow a previously opened implicitly included
    file.
    (_cpp_find_file): Add implicit_preinclude argument.  Free file and
    do not call open_file_failed if implicit_preinclude.  Store
    implicit_preinclude value.
    (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date):
    Update calls to _cpp_find_file.
    (_cpp_stack_include): Handle IT_DEFAULT.
    (cpp_push_default_include): New.
    * include/cpplib.h (cpp_push_default_include): Declare.
    * init.c (cpp_read_main_file): Update call to _cpp_find_file.
    * internal.h (enum include_type): Add IT_DEFAULT.
    (_cpp_find_file): Update prototype.


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
@ 2012-11-19 22:55 ` joseph at codesourcery dot com
  2012-11-19 23:53 ` sje at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: joseph at codesourcery dot com @ 2012-11-19 22:55 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-11-19 22:54:40 UTC ---
This is heavily dependent on the details of system headers - though I did 
test it for glibc both with and without stdc-predef.h.  You'll need to 
debug it with your particular system header arrangements.


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
  2012-11-19 22:55 ` [Bug pch/55399] " joseph at codesourcery dot com
@ 2012-11-19 23:53 ` sje at gcc dot gnu.org
  2012-11-20  0:16 ` joseph at codesourcery dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2012-11-19 23:53 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Steve Ellcey <sje at gcc dot gnu.org> 2012-11-19 23:53:08 UTC ---
Do you have any suggestions of where I should start?  The failures are with
tests that create preprocessed header file, remove the original header file,
then compile a program that includes the header file.  It fails to use the
preprocessed header file in that case and then fails because the
un-preprocessed header file no longer exists.  I can make it work by specifying
-ffreestanding, so does that mean that there is something in the system headers
that is inhibiting the use of preprocessed headers?

I am using the latest glibc and I do not see stdc-predef.h anywhere in my
install or object directories though I do see it in the glibc source directory.


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
  2012-11-19 22:55 ` [Bug pch/55399] " joseph at codesourcery dot com
  2012-11-19 23:53 ` sje at gcc dot gnu.org
@ 2012-11-20  0:16 ` joseph at codesourcery dot com
  2012-11-20  0:32 ` sje at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: joseph at codesourcery dot com @ 2012-11-20  0:16 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-11-20 00:15:42 UTC ---
Well, you need to start by looking at how it "fails", e.g. segfault, 
macros found to be predefined not the same as those predefined when the 
PCH was created, other test for when PCH file can be included failing.  
And then track things from there.  If stdc-predef.h is in your glibc 
sources, it should also have been installed in the usr/include directory 
of your glibc installation, and the point at which state is saved should 
be the point after stdc-predef.h is included (so its macros are considered 
predefined, and so that PCH files can be included after the implicit 
stdc-predef.h include without failing the test for consistency of 
predefined macros).


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-11-20  0:16 ` joseph at codesourcery dot com
@ 2012-11-20  0:32 ` sje at gcc dot gnu.org
  2012-11-20  0:44 ` joseph at codesourcery dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2012-11-20  0:32 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Steve Ellcey <sje at gcc dot gnu.org> 2012-11-20 00:32:22 UTC ---
OK, forget the comment about stdc-predef.h, I was looking in my GCC install
area instead of the glibc root area.  I do have stdc-predef.h.

The failure mode is a refusal to use any precompiled headers.  I.e. the first
line in the test program (common-1.c from gcc.dg/pch/common-1.c) is '#include
"common-1.h"' and if there is a common-1.h.gch but no common-1.h, the program
will say it can't find common-1.h.


./common-1.c:1:22: fatal error: common-1.h: No such file or directory
 #include "common-1.h"
                      ^
compilation terminated.


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-11-20  0:32 ` sje at gcc dot gnu.org
@ 2012-11-20  0:44 ` joseph at codesourcery dot com
  2012-11-21 21:29 ` sje at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: joseph at codesourcery dot com @ 2012-11-20  0:44 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-11-20 00:44:06 UTC ---
So you need to trace the cause of not using the header.  -Winvalid-pch may 
help, but ultimately you need to find whether the file is examined at all, 
if not then why not, and if examined but rejected then what the cause of 
the rejection is.  And compare with working systems.


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-11-20  0:44 ` joseph at codesourcery dot com
@ 2012-11-21 21:29 ` sje at gcc dot gnu.org
  2012-11-21 21:42 ` sje at gcc dot gnu.org
  2015-06-12 11:59 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2012-11-21 21:29 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Steve Ellcey <sje at gcc dot gnu.org> 2012-11-21 21:28:41 UTC ---
Author: sje
Date: Wed Nov 21 21:28:30 2012
New Revision: 193709

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193709
Log:
2012-11-21  Steve Ellcey  <sellcey@mips.com>

    PR pch/55399
    * files.c (pch_open_file): Fix check for implicit_preinclude.

Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/files.c


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-11-21 21:29 ` sje at gcc dot gnu.org
@ 2012-11-21 21:42 ` sje at gcc dot gnu.org
  2015-06-12 11:59 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: sje at gcc dot gnu.org @ 2012-11-21 21:42 UTC (permalink / raw)
  To: gcc-bugs


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

Steve Ellcey <sje at gcc dot gnu.org> changed:

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

--- Comment #7 from Steve Ellcey <sje at gcc dot gnu.org> 2012-11-21 21:41:49 UTC ---
Patch for this has been checked in.


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

* [Bug pch/55399] pch tests fail on mips-mti-linux-gnu target
  2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-11-21 21:42 ` sje at gcc dot gnu.org
@ 2015-06-12 11:59 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-12 11:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55399
Bug 55399 depends on bug 65550, which changed state.

Bug 65550 Summary: [4.8/4.9 Regression] ICE (segfault) with pch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65550

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


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

end of thread, other threads:[~2015-06-12 11:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-19 21:36 [Bug pch/55399] New: pch tests fail on mips-mti-linux-gnu target sje at gcc dot gnu.org
2012-11-19 22:55 ` [Bug pch/55399] " joseph at codesourcery dot com
2012-11-19 23:53 ` sje at gcc dot gnu.org
2012-11-20  0:16 ` joseph at codesourcery dot com
2012-11-20  0:32 ` sje at gcc dot gnu.org
2012-11-20  0:44 ` joseph at codesourcery dot com
2012-11-21 21:29 ` sje at gcc dot gnu.org
2012-11-21 21:42 ` sje at gcc dot gnu.org
2015-06-12 11:59 ` jakub at gcc dot gnu.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).