Skip to content

'fir.embox' op operand #0 must be any reference #917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oroppas opened this issue Jul 10, 2021 · 1 comment
Closed

'fir.embox' op operand #0 must be any reference #917

oroppas opened this issue Jul 10, 2021 · 1 comment
Assignees

Comments

@oroppas
Copy link

oroppas commented Jul 10, 2021

The code below results in the following error:

error: loc("./fir_embox.f90":26:5): 'fir.embox' op operand #0 must be any reference, but got '!fir.box<!fir.type<_QMcommTqm_ewald_structure{ewald_startup:!fir.logical<4>}>>'
oops, pass manager reported failure
module comm

  implicit none

  type:: simulation_t

    type(qm_ewald_structure),pointer :: ewald

  end type simulation_t


  type qm_ewald_structure

     logical :: ewald_startup !True if this is the very first MD step and we are doing qmewald.

  end type qm_ewald_structure
 

contains

  subroutine setp_simulation(a, ewald_struct)

    type(simulation_t), pointer  :: a
    type(qm_ewald_structure), target :: ewald_struct 

    a % ewald   => ewald_struct

  end subroutine

end module
@schweitzpgi schweitzpgi self-assigned this Jul 27, 2021
@schweitzpgi
Copy link

This passes in my sandbox.

schweitzpgi added a commit that referenced this issue Jul 27, 2021
It does not make sense to embox a box. Instead we can convert the box's
signature with a fir.convert, which is idempotent on the boxed value.
schweitzpgi added a commit that referenced this issue Jul 29, 2021
mleair pushed a commit that referenced this issue Oct 18, 2021
It does not make sense to embox a box. Instead we can convert the box's
signature with a fir.convert, which is idempotent on the boxed value.
jeanPerier pushed a commit that referenced this issue Oct 22, 2021
It does not make sense to embox a box. Instead we can convert the box's
signature with a fir.convert, which is idempotent on the boxed value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants