Unofficial GCC patches - ytomino/drake GitHub Wiki

These are patches made for GCC and are presented without warranty of any kind!

Contents

Patch \ GCC Version 4.5 4.6 4.7 4.8 4.9 5 6 7 8
Patch to match anonymous access discriminants of formal types Y Y Y Y Y Y Y Y Y
Patch to always use Raise_From_Controlled_Operation Y Y Y Y Y Y Y Y Y
Patch to remove empty finalize_spec finalize_body N N Y Y Y Y Y Y Y
Patch to remove _master of access types across limited with N N N N N Y Y Y Y

(Y means applicable the patch, N means not applicable the patch.)

Patch \ GCC Version 4.5 4.6 4.7 4.8 4.9 5 6 7 8 9 10
Patch to remove empty _elabs _elabb Y Y Y Y Y Y N N N N N
Patch to place aliased constant objects into read-only section N N N N Y N N N N N N
Patch to fix global buffer overflow reported by ASAN N N N Y Y Y Y Y Y Y N

(N means already fixed.)

I need help to report them! Also, my English is poor, as you see, so any help in that department is greatly appreciated :)

GNAT has many name-lookup bugs related to generics, renames or use type clauses.

AdaCore introduced new finalization-master mechanism and many bugs with it in gcc-4.7.

The parser cannot parse (Parent_Type'(...) with ...) and therefore a call to a built-in-place function cannot be in an ancestor part.

The current preventive measure includes making an additional initialization-procedure.

The lifetime rule of coextensions is not implemented correctly.

Refer to Annotated RM.

An access type to class-wide of tagged limited type introduces _master variable and dynamic-elab.

system__storage_pools___master : constant integer :=
  system__soft_links__current_master.all;
system__storage_pools__root_storage_pool_ptrM : integer renames
  system__storage_pools___master;
type system__storage_pools__root_storage_pool_ptr is access all
  system__storage_pools__root_storage_pool'class
  with storage_size => 0;
       .globl _system__storage_pools___elabs
_system__storage_pools___elabs:
       pushq   %rbp
       movq    %rsp, %rbp
       movq    _system__soft_links__current_master@GOTPCREL(%rip), %rax
       movq    (%rax), %rax
       call    *%rax
       movl    %eax, _system__storage_pools___master(%rip)
       popq    %rbp
       ret

These are necessities for tasks contained in a derived type of the origin tagged limited type. However, use of a task component is a rare case. These variables and elaborations usually lead nowhere, so I want to remove these cases.

But for for T'Storage_Size use 0; (or with Storage_Size => 0;) it is meaningless to remove these.

sem_ch3.Expand_N_Full_Type_Declaration makes these before einfo.Set_No_Pool_Assigned is called. Meaning it's too early!

Note, I have to try https://www.adacore.com/developers/development-log/NF-18-P629-041-gnat/ after gcc-8.

https://sources.debian.org/src/gcc-7/latest/debian/patches/

⚠️ **GitHub.com Fallback** ⚠️