diff mbox

New backend header reduction

Message ID 87a8qw3kzp.fsf@kepler.schwinge.homeip.net
State New
Headers show

Commit Message

Thomas Schwinge Nov. 2, 2015, 7:42 a.m. UTC
Hi!

"Hooray for the C programming language's module system"...  ;-)

On Fri, 23 Oct 2015 12:53:40 -0400, Andrew MacLeod <amacleod@redhat.com> wrote:
> Just finished running...  I think the external hard drive was slowing 
> down this run :-P  It took quite a while.
> 
> Anyway, this is the reduction patch independent of the header-ordering 
> patch... ie, that patch needs to be applied before this one.   So this 
> should be mostly just removals.   I also need to follow up and build all 
> the target and bootstrap from scratch to make sure there arent any 
> weirdnesses with it.   But you can at least get a look at it now.

Similar to the ENABLE_OFFLOADING preprocessor conditional as reported by
Cesar and Nathan, I've run into a problem with code "hidden" behind
ENABLE_FOLD_CHECKING, and this has independently also been reported as
<https://gcc.gnu.org/PR68166>:

    [...]/source-gcc/gcc/fold-const.c: In function 'tree_node* fold(tree)':
    [...]/source-gcc/gcc/fold-const.c:12038:18: error: aggregate 'md5_ctx ctx' has incomplete type and cannot be defined
       struct md5_ctx ctx;
                      ^

..., followed by many more errors.

As obvious, committed in r229652:

commit b7c78b0949974f6e22fa9a3f3eca665442641ec8
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Nov 2 07:42:04 2015 +0000

    [PR middle-end/68166] Restore build with fold checking enabled
    
    	gcc/
    	PR middle-end/68166
    	* fold-const.c: Include "md5.h".
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229652 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog    | 5 +++++
 gcc/fold-const.c | 1 +
 2 files changed, 6 insertions(+)



Grüße
 Thomas

Comments

Andrew MacLeod Nov. 2, 2015, 1:50 p.m. UTC | #1
On 11/02/2015 02:42 AM, Thomas Schwinge wrote:
> Hi!
>
> "Hooray for the C programming language's module system"...  ;-)
>
> On Fri, 23 Oct 2015 12:53:40 -0400, Andrew MacLeod <amacleod@redhat.com> wrote:
>> Just finished running...  I think the external hard drive was slowing
>> down this run :-P  It took quite a while.
>>
>> Anyway, this is the reduction patch independent of the header-ordering
>> patch... ie, that patch needs to be applied before this one.   So this
>> should be mostly just removals.   I also need to follow up and build all
>> the target and bootstrap from scratch to make sure there arent any
>> weirdnesses with it.   But you can at least get a look at it now.
> Similar to the ENABLE_OFFLOADING preprocessor conditional as reported by
> Cesar and Nathan, I've run into a problem with code "hidden" behind
> ENABLE_FOLD_CHECKING, and this has independently also been reported as
> <https://gcc.gnu.org/PR68166>:
>
>      [...]/source-gcc/gcc/fold-const.c: In function 'tree_node* fold(tree)':
>      [...]/source-gcc/gcc/fold-const.c:12038:18: error: aggregate 'md5_ctx ctx' has incomplete type and cannot be defined
>         struct md5_ctx ctx;
>
ahhh. lovely.   ok, so I'll hold off checking in the approved front end 
patch until I rerun the tool.  I can pre-define a set of macros in the 
tool to mimic these command-line options that might be seen in order to 
make sure that headers arent removed that cause these kinds of issues.

After it runs, I'll see if there were any front end files that need 
adjusting to account for this, then I'll check them in.

I will also rerun the tool over the next week or so on all the backend.a 
files from the revision just before I merged to see if anything else 
comes out of the woodwork.  There could still be a hidden case or two 
like this.

A quick grep shows the following macros should probably be predefined:

ENABLE_ASSERT_CHECKING
ENABLE_CHECKING
ENABLE_DECIMAL_BID_FORMAT
ENABLE_DECIMAL_FLOAT
ENABLE_DEFAULT_PIE
ENABLE_DEFAULT_SSP
ENABLE_DF_CHECKING
ENABLE_FIXED_POINT
ENABLE_FOLD_CHECKING
ENABLE_GC_ALWAYS_COLLECT
ENABLE_GC_CHECKING
ENABLE_GIMPLE_CHECKING
ENABLE_IRA_CHECKING
ENABLE_LD_BUILDID
ENABLE_LIBQUADMATH_SUPPORT
ENABLE_LTO
ENABLE_NLS
ENABLE_OFFLOADING
ENABLE_PLUGIN
ENABLE_PLUGINS
ENABLE_PTHREADS
ENABLE_RTL_CHECKING
ENABLE_RTL_FLAG_CHECKING
ENABLE_RUNTIME_CHECKING
ENABLE_SHARED_LIBGCC
ENABLE_TREE_CHECKING
ENABLE_TYPES_CHECKING
ENABLE_VALGRIND_ANNOTATIONS
ENABLE_VALGRIND_CHECKING
ENABLE_WIN32_REGISTRY

Anyone think of anything else the might come from a command line that 
wouldnt be seen otherwise?

Andrew
diff mbox

Patch

diff --git gcc/ChangeLog gcc/ChangeLog
index d927d35..966a7f9 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-11-02  Thomas Schwinge  <thomas@codesourcery.com>
+
+	PR middle-end/68166
+	* fold-const.c: Include "md5.h".
+
 2015-11-01  Jeff Law <jeff@redhat.com>
 
 	* vmsdbgout.c: Revert unused header file reduction patch.
diff --git gcc/fold-const.c gcc/fold-const.c
index 197ccfd..1a2fb810 100644
--- gcc/fold-const.c
+++ gcc/fold-const.c
@@ -71,6 +71,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "gimple-fold.h"
 #include "params.h"
 #include "tree-into-ssa.h"
+#include "md5.h"
 
 #ifndef LOAD_EXTEND_OP
 #define LOAD_EXTEND_OP(M) UNKNOWN