Hi Paul, please run the style-checker on the patch before pushing.
Furthermore, shouldn't that + changed, the dtype updating and the correct rank used. */ rather be + changed, the dtype updated and the correct rank used. */ ^^ Besides that the patch looks good to me. Ok for mainline. The best seasons greeting to you and everyone else, too. Thanks for the patch, Andre On Mon, 23 Dec 2024 07:50:18 +0000 Paul Richard Thomas <paul.richard.tho...@gmail.com> wrote: > Hi All, > > These bugs were tricky to find because neither were detected by regression > testing on my platform. > > PR116254: This bug was sporadic even where the regression was detected. > Richard Sandiford found "Conditional jump or move depends on uninitialised > value" errors in the library, triggered by the test for for spread in > class_transformational_2.f90. Mea culpa, I had failed to notice this. > It turned out that, alone of the rank changing intrinsic functions, spread > was going through the wrong code path. This is fixed by the > explicit condition in the patch. > > Richard also noted that spread results are being copied from uninitialised > memory. This was not quite correct because the library function was doing > the job on detection of the NULL descriptor data field. Nevertheless, I > have refactored slightly to ensure that the temporary descriptor has its > dtype field set correctly before the class data is pointed at it. Valgrind > shows both class_transformational tests to now be as clean as a whistle. > > PR118059: The reporter found, with an ubsan instrumented gcc, that > class_transformational_1.f90 was generating an invalid value for type > 'expr_t' in gcc/fortran/trans-expr.cc. The offending statement is; B = > reshape (chr, [5, 1, 2]), where 'B' is unlimited polymorphic. This requires > a trivial fix since the assignment of a character array valued function to > an unlimited polymorphic variable unconditionally requires a temporary. > > Regression tests without errors - OK for mainline? > > Seasons greetings to one and all. > > Paul -- Andre Vehreschild * Email: vehre ad gmx dot de