[Bug target/26427] with -fsection-anchors with zero sized structs

2015-12-11 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427

--- Comment #25 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Fri Dec 11 16:39:49 2015
New Revision: 231571

URL: https://gcc.gnu.org/viewcvs?rev=231571&root=gcc&view=rev
Log:
2015-12-11  Jan-Benedict Glaw  
Dominique d'Humieres  

PR target/26427
PR target/33120
PR testsuite/35710

* config/darwin.c (darwin_use_anchors_for_symbol_p): Fix indention and
trailing whitespace.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin.c

[Bug target/26427] with -fsection-anchors with zero sized structs

2015-12-11 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427

--- Comment #24 from Jan-Benedict Glaw  ---
Created attachment 36998
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36998&action=edit
Patch to fix indention/trailing whitespace

[Bug target/26427] with -fsection-anchors with zero sized structs

2015-12-11 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427

Jan-Benedict Glaw  changed:

   What|Removed |Added

 CC||jbg...@lug-owl.de

--- Comment #23 from Jan-Benedict Glaw  ---
When building with recent GCCs, this patch produces a warning, see the build
log [1] of build #479519 [2]:

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-common  -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/.
-I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include
-I/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber
-I../../../gcc/gcc/../libdecn
umber/dpd -I../libdecnumber -I../../../gcc/gcc/../libbacktrace   -o darwin.o
-MT darwin.o -MMD -MP -MF ./.deps/darwin.TPo ../../../gcc/gcc/config/darwin.c
../../../gcc/gcc/config/darwin.c: In function ‘bool
darwin_use_anchors_for_symbol_p(const_rtx)’:
../../../gcc/gcc/config/darwin.c:3016:9: error: statement is indented as if it
were guarded by... [-Werror=misleading-indentation]
 return default_use_anchors_for_symbol_p (symbol);
 ^~

../../../gcc/gcc/config/darwin.c:3012:7: note: ...this ‘if’ clause, but it is
not
   if (sect->common.flags & SECTION_NO_ANCHOR)
   ^~

cc1plus: all warnings being treated as errors
../../../gcc/gcc/config/t-darwin:22: recipe for target 'darwin.o' failed

I suggest the attached patch for reindention and fixing up trailing whitespace.

[1]
http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=view&id=4390920
[2] http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=479519

[Bug target/26427] with -fsection-anchors with zero sized structs

2011-01-10 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427

Iain Sandoe  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #22 from Iain Sandoe  2011-01-10 20:26:19 
UTC ---
fixed on trunk


[Bug target/26427] with -fsection-anchors with zero sized structs

2010-11-29 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26427

--- Comment #21 from Iain Sandoe  2010-11-29 14:58:23 
UTC ---
Author: iains
Date: Mon Nov 29 14:58:16 2010
New Revision: 167242

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167242
Log:

PR target/26427
PR target/33120
PR testsuite/35710

gcc:
* config/i386/darwin.h (ASM_OUTPUT_COMMON): Remove
(ASM_OUTPUT_LOCAL): Likewise.
* config/darwin-protos.h (darwin_asm_declare_object_name): New.
(darwin_output_aligned_bss): Likewise.
(darwin_asm_output_aligned_decl_local): Likewise.
(darwin_asm_output_aligned_decl_common): Likewise.
(darwin_use_anchors_for_symbol_p): Likewise.
* config/rs6000/darwin.h (ASM_OUTPUT_COMMON): Remove.
(TARGET_ASM_OUTPUT_ANCHOR): Define.
(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
(DARWIN_SECTION_ANCHORS): Set to 1.
* config/darwin.c (emit_aligned_common): New var.
(darwin_init_sections): Check that the Darwin private zero-size section
marker is in range.
(darwin_text_section): Check for zero-sized objects.
(darwin_mergeable_string_section): Likewise.
(darwin_mergeable_constant_section): Likewise.
(machopic_select_section): Adjust to check for zero-sized objects.
Assert that OBJC meta data are non-zero sized.
(darwin_asm_declare_object_name): New.
(darwin_asm_declare_constant_name): Adjust for zero-sized
object sections.
(BYTES_ZFILL): Define.
(darwin_emit_weak_or_comdat): New.
(darwin_emit_local_bss): New.
(darwin_emit_common): New.
(darwin_output_aligned_bss): New.
(darwin_asm_output_aligned_decl_common): New.
(darwin_asm_output_aligned_decl_local): New.
(darwin_file_end): Disable subsections_via_symbols when section
anchoring is active.
(darwin_asm_output_anchor): Re-enable.
(darwin_use_anchors_for_symbol_p): New.
(darwin_override_options): Check for versions that can emit
aligned common.  Update usage of flags to current.
* config/darwin-sections.def: Update comments and flags for
non-anchor sections.  zobj_const_section, zobj_data_section,
zobj_bss_section, zobj_const_data_section: New.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME): Redefine.
(ASM_OUTPUT_ALIGN): Make whitespace output consistent.
(L2_MAX_OFILE_ALIGNMENT): Define.
(ASM_OUTPUT_ALIGNED_BSS): Define.
(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Define.
(ASM_OUTPUT_ALIGNED_DECL_COMMON): Define.
(SECTION_NO_ANCHOR): Define.
(TARGET_ASM_OUTPUT_ANCHOR) Define with a default of NULL.
(DARWIN_SECTION_ANCHORS): Define with a default of 0.

boehm-gc:
* dyn_load.c (GC_register_dynamic_libraries/DARWIN):  Add new writable
data section names.
(GC_dyld_name_for_hdr): Adjust layout.
(GC_dyld_image_add): Adjust layout, add new Darwin sections, adjust
debug to name the sections.
(GC_dyld_image_remove): Adjust layout, remove new Darwin sections,
adjust debug to name the sections.
(GC_register_dynamic_libraries): Adjust layout.
(GC_init_dyld): Likewise.
(GC_register_main_static_data): Likewise.

gcc/testsuite:
* gcc.target/powerpc/darwin-abi-12.c: Adjust for new allocators.
* gcc.dg/pr26427.c: Remove redundant warning for powerpc.
* gcc.dg/darwin-comm.c: Adjust for new allocators.
* gcc.dg/darwin-sections.c: New test.
* g++.dg/ext/instantiate2.C: Adjust for new allocators.


Added:
trunk/gcc/testsuite/gcc.dg/darwin-sections.c
Modified:
trunk/boehm-gc/ChangeLog
trunk/boehm-gc/dyn_load.c
trunk/gcc/ChangeLog
trunk/gcc/config/darwin-protos.h
trunk/gcc/config/darwin-sections.def
trunk/gcc/config/darwin.c
trunk/gcc/config/darwin.h
trunk/gcc/config/i386/darwin.h
trunk/gcc/config/rs6000/darwin.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/instantiate2.C
trunk/gcc/testsuite/gcc.dg/darwin-comm.c
trunk/gcc/testsuite/gcc.dg/pr26427.c
trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-12.c


[Bug target/26427] with -fsection-anchors with zero sized structs

2006-06-29 Thread pinskia at gcc dot gnu dot org


--- Comment #20 from pinskia at gcc dot gnu dot org  2006-06-29 18:58 
---
This has been worked arounded on the mainline.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|[4.2 Regression] with - |with -fsection-anchors with
   |fsection-anchors with zero  |zero sized structs
   |sized structs   |
   Target Milestone|4.2.0   |---


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