Re: 'TREE_READONLY' for 'const' array in C vs. C++

2025-04-01 Thread Richard Biener via Gcc
On Tue, Apr 1, 2025 at 12:04 AM Thomas Schwinge wrote: > > Hi! > > In Nvidia PTX, "A state space is a storage area with particular > characteristics. All variables reside in some state space. [...]". > These include: > > .const Shared, read-only memory. > .global Global memory, shared

Re: 'TREE_READONLY' for 'const' array in C vs. C++

2025-04-01 Thread Alexander Monakov
On Tue, 1 Apr 2025, Richard Biener via Gcc wrote: > In C++ there could be runtime initializers for a const qualified > object. I think all > you need to do is make sure the logic that places the object in .const > vs. .global > is consistent with the logic deciding how to access it. I think it

Re: 'TREE_READONLY' for 'const' array in C vs. C++

2025-04-01 Thread Jakub Jelinek via Gcc
On Tue, Apr 01, 2025 at 09:19:08AM +0200, Richard Biener via Gcc wrote: > On Tue, Apr 1, 2025 at 12:04 AM Thomas Schwinge > wrote: > > In Nvidia PTX, "A state space is a storage area with particular > > characteristics. All variables reside in some state space. [...]". > > These include: > > >