https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114438

--- Comment #1 from anlauf at gcc dot gnu.org ---
Can you be a little more explicit?

If I extend the program as follows:

    type(params) :: p
    p = params( 0.1, 2.0 )
    write(*,*) p
    p = params( 0.1, 2 )
    write(*,*) p

I get with all compilers I have access to (Intel, NAG, Nvidia, flang, gfortran)

 Not the structure constructor
  0.100000001       4.00000000    
  0.100000001       2.00000000    

This is what I would have naively expected in accordance with "Note 1":

  The form ’name(...)’ is interpreted as a generic function-reference if
  possible; it is interpreted as a structure-constructor only if it cannot
  be interpreted as a generic function-reference.

which gives a precedence to function-reference over structure-constructor,
making it possible to override the default constructor.

Are you saying that one cannot override the default constructor?

Reply via email to