This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/58944] [4.9 Regression] bogus -Wunused-macros warnings when compiling Libreoffice
- From: "tmsriram at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Dec 2013 03:17:36 +0000
- Subject: [Bug target/58944] [4.9 Regression] bogus -Wunused-macros warnings when compiling Libreoffice
- Auto-submitted: auto-generated
- References: <bug-58944-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58944
--- Comment #7 from Sriraman Tallam <tmsriram at google dot com> ---
(In reply to tmsriram@gcc.gnu.org from comment #6)
> Author: tmsriram
> Date: Tue Dec 3 03:14:09 2013
> New Revision: 205616
>
> URL: http://gcc.gnu.org/viewcvs?rev=205616&root=gcc&view=rev
> Log:
> This patch fixes PR 58944
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58944
>
> ix86_valid_target_attribute_tree in config/i386/i386.c was
> refactored to not depend on global_options structure and to be able to
> use any gcc_options structure. One clean way to fix this is by having
> target_option_default_node save all the default target options which
> can be restored to any gcc_options structure. The root cause of the
> above bugs was that ix86_arch_string and ix86_tune_string was not
> saved in target_option_deault_node.
>
> This patch saves all the target options used in i386.opt which are
> either obtained from the command-line or set to some default.
>
> Testing:
> Patch tested for bootstrap on all default languages(also obj-c++ and ada)
> on x86_64 and regression testsuite checked for parity with RUNTESTFLAGS -m32
> and m64.
>
>
> Added:
> trunk/gcc/testsuite/gcc.target/i386/pr58944.c
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/config/i386/i386.c
> trunk/gcc/config/i386/i386.opt
> trunk/gcc/testsuite/ChangeLog
Accidentally deleted ChangeLog entry to commit log and committed the patch.
Here is the ChangeLog:
2013-12-02 Sriraman Tallam <tmsriram@google.com>
PR target/58944
* config/i386/i386.opt (ix86_arch_string): Mark this variable
for saving in cl_target_option.
(ix86_tune_string): Ditto.
(ix86_cmodel): Ditto.
(ix86_abi): Ditto.
(ix86_asm_dialect): Ditto.
(ix86_branch_cost): Ditto.
(ix86_dump_tunes): Ditto.
(ix86_force_align_arg_pointer): Ditto.
(ix86_force_drap): Ditto.
(ix86_incoming_stack_boundary_arg): Ditto.
(ix86_pmode): Ditto.
(ix86_preferred_stack_boundary_arg): Ditto.
(ix86_recip_name): Ditto.
(ix86_regparm): Ditto.
(ix86_section_threshold): Ditto.
(ix86_sse2avx): Ditto.
(ix86_stack_protector_guard): Ditto.
(ix86_stringop_alg): Ditto.
(ix86_tls_dialect): Ditto.
(ix86_tune_ctrl_string): Ditto.
(ix86_tune_memcpy_strategy): Ditto.
(ix86_tune_memset_strategy): Ditto.
(ix86_tune_no_default): Ditto.
(ix86_veclibabi_type): Ditto.
* config/i386/i386.c
(function_specific_save): Save the above variables
in gcc_options to cl_target_option.
(function_specific_restore): Do the reverse done in
function_specific_save.
(ix86_valid_target_attribute_tree): Change ix86_arch_string
and ix86_tune_string to use the opts structure.
(ix86_option_override_internal):Change
ix86_incoming_stack_boundary_arg to
opts->x_ix86_incoming_stack_boundary_arg
PR target/58944
* testsuite/gcc.target/i386/pr58944.c: New test.