------- Comment #6 from ros at rzg dot mpg dot de 2009-10-09 13:51 ------- (In reply to comment #5) I have further reducd the test code to: idx=sum(maxloc(index(pfd%n,pfmt)))-1 Program GF_BUG ! type psfd character :: n*3 end type psfd character :: pfmt*3='' type(psfd), parameter :: pfd(1)=[psfd('')] ! idx=sum(maxloc(index(pfd%n,pfmt)))-1 end
For the error message to appear it is essential - that the variable 'psfd' is of derived type, - that the type declaration statement for 'pdf' has the attribute PARAMETER - and the statement 'idx=sum(maxloc(index(pfd%n,pfmt)))-1' exists in this form. Splitting up this statement into 'idx=sum(maxloc(index(pfd%n,pfmt)))' and 'idx=idx-1' makes the error message disappear! I hope, this helps for fixing the bug. -- ros at rzg dot mpg dot de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ros at rzg dot mpg dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41044