Re: [PATCH] Implement wrap-around arithmetics in DWARF expressions

2024-06-03 Thread Richard Biener
On Mon, Jun 3, 2024 at 11:18 AM Eric Botcazou wrote: > > Hi, > > for the attached Ada package declaring a simple variable-sized record type, > the compiler builds a "size function" in GENERIC which is at -Og: > > sizetype _GLOBAL.SZ5_p (p__enum p0) > { > return (UNSIGNED_8) p0 + 252 <= 3 ? 32 :

[PATCH] Implement wrap-around arithmetics in DWARF expressions

2024-06-03 Thread Eric Botcazou
Hi, for the attached Ada package declaring a simple variable-sized record type, the compiler builds a "size function" in GENERIC which is at -Og: sizetype _GLOBAL.SZ5_p (p__enum p0) { return (UNSIGNED_8) p0 + 252 <= 3 ? 32 : 0; } The UNSIGNED_8-based trick eliminates one branch but relies on