Hi Jeff,

>> gcc/
>>      * common.opt (flimit-function-alignment): New.
>>      * doc/invoke.texi (-flimit-function-alignment): Document.
>>      * emit-rtl.h (struct rtl_data): Add max_insn_address field.
>>      * final.c (shorten_branches): Set it.
>>      * varasm.c (assemble_start_function): Limit alignment if
>>      requested.
>>
>> gcc/testsuite/
>>      * gcc.target/i386/align-limit.c: New test.
> OK.  Sorry for the long delay.

unfortunately, this broke Solaris 12/SPARC bootstrap with /bin/as:

/vol/gcc/src/hg/trunk/local/gcc/varasm.c: In function 'void 
assemble_start_function(tree, const char*)':
/vol/gcc/src/hg/trunk/local/gcc/varasm.c:1794:11: error: unused variable 
'align_log' [-Werror=unused-variable]
       int align_log = align_functions_log;
           ^~~~~~~~~

The following fixes it and allowed bootstrap to complete successfully.
I'm going to commit it as obvious.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2016-11-24  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * varasm.c (assemble_start_function): Wrap align_log definition in
        ASM_OUTPUT_MAX_SKIP_ALIGN.

diff --git a/gcc/varasm.c b/gcc/varasm.c
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1791,7 +1791,9 @@ assemble_start_function (tree decl, cons
       && align_functions_log > align
       && optimize_function_for_speed_p (cfun))
     {
+#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
       int align_log = align_functions_log;
+#endif
       int max_skip = align_functions - 1;
       if (flag_limit_function_alignment && crtl->max_insn_address > 0
 	  && max_skip >= crtl->max_insn_address)

Reply via email to