Problem with dynamic allocation of 2D arrays

I seem to run into some problems related to the dynamic allocation of 2D arrays. Attached is a trivial macro reproducing the problem. On running, as usual, with
.L example.C
example(kFALSE)
I get the error message
“Error: non class,struct,union object $txt used with . or -> FILE:example. LINE:23”

The problem goes away if I statically allocate ‘pos’ in the macro, or if I make it a one-dimensional array (of course, with appropriate modifications to the
code), so it seems like there is something funny in the allocation of 2D arrays.
I am using v3.10.02 on a Redhat 8.0 Linux x86 box.

Regards,
Gora
example.C (717 Bytes)

This looks like a CINT optimisation problem.
If you run with .O0 the problem disappears.

The problem has been reported to Masa.

Rene

This is Masa’s response to the problem:

"I am looking in to the problem. It turns out the problem only occurs
in ROOT and not pure Cint. It has something to do with special object
look-up scheme. In order to debug, I need to setup ROOT build
environment on Cygwin first. Please wait for a while.

Thank you
Masa Goto"

Rene