This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] PR 56582


Hi,

in cxx_eval_array_reference we don't check whether the subscript is negative and we end up either ICEing or emitting wrong code. Adding the check seems trivial, but I'm not sure if there is something more subtle to the issue which I'm missing.

Also note that in principle we could have somewhat neater code but, as far as I can see, we would end up doing more comparisons (see the _alt patch).

Tested x86_64-linux.

Thanks,
Paolo.

////////////////////

Attachment: CL_56582
Description: Text document

Attachment: patch_56582
Description: Text document

Attachment: patch_56582_alt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]