AdaCore / adareducer

GNU General Public License v3.0
13 stars 2 forks source link

Final file is not compilable due to "predicate no longer applies" #28

Closed yannickmoy closed 2 years ago

yannickmoy commented 2 years ago

On a project, adareducer ends with the error:

adareducer has found that the predicate no longer applies
after completing a cycle on one file. This is unexpected.

Its advice about builders does not apply here, as I'm using gcc in the oracle script:

gcc -c -gnat95 file.adb > test.out 2>&1
grep "error: run-time library configuration error" test.out

And the last file being reduced is left in a non-compilable state, with null statements badly inserted in many places:

        for T in 1 .. NUMBER_OF_TRANSITIONS_FROM (FROM_STATE) loop
            THE_TRANSITIONnull;
            if (NUMBER_OF_TRANSITION_SETS_CONTAINING (THE_TRANSITION) = 0)
            and then CPS.TRANSITION_ENABLED (THE_TRANSITION) then
                null;null;null
            end if;

How can I investigate this issue?

setton commented 2 years ago

This is probably due to the presence of tabs in the original, and should be fixed with #30.