Missing diagnostics for invalid PACK() arguments

Missing diagnostics for invalid PACK() arguments

Bild des Benutzers Harald

Hello,

there is no diagnostics generated for the following code:

  print *, pack ( array=[1,2],mask=.true.,vector=[0] ) ! Illegal

neither at compile nor at run-time even with "-check all" specified.

The standard requires that the size of vector in the above case has to be at least as large as array.

Best regards,

Harald

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Kevin Davis (Intel)

Thank you for post. I reported this to our Fortran Developers for further consideration (under the internal tracking id below) of issuing either a run-time or compile-time diagnostic. You are correct, when mask is a scalar with value true, vector must have at least as many elements as there are in array.

(Internal tracking id: DPD200238475)

Melden Sie sich an, um einen Kommentar zu hinterlassen.