INTERFACE/CONTAINS Stack is full #6618

INTERFACE/CONTAINS Stack is full #6618

error #6618: The INTERFACE/CONTAINS stack is full. This means that modules are being 'used' in a circular way.

I am confused as to what this error means. As far as I can tell, there is no circular 'use' statements in my code. I would put examples but I have been unable to reproduce the error with an example code and cannot post my entire code here. Can anyone provide any insight as to what causes this error?

It cropped up when I included a use statement in a module for a data type that extends a class and the same class, so:

module Example

use SomethingThatExtendsExampleClass

use ExampleClass

end module Example

However, now that it has occured, I cannot get rid of the error even after commenting out all new code.

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Did you also remove any old .mod files after making this source change?

Its possiblea circular 'use' link was created accidentally by not removing the previous .mod files and adding the new 'use' statements.

I've made clean multiple times and that was the first thing I checked. There are no .o or .mod files when I compile. Is there a short example that would cause this kind of error or is it not that clear as to what would activate it?

The short example I had in mind that might produce error #6618instead produces:

sample.f90(7): error #7765: FATAL ERROR - conflict or recursive module USE [B]

I'll check w/Development abouta small unit test that might help explain the circumstances when #6618 is issued.

I guess this error as resurfaced for you (based on the previous thread - here) or perhaps it was never resolved?

I was developing a different piece of code and ran into that problem. Instead of resolving it (because I was working on other problems that have been posted here) I deleted what was causing the problem and moved on. Now I have implemented something else and ran into the problem again.

In my experience, this error message has always been a symptom of a compiler bug. Can you provide us with a test case?

Retired 12/31/2016

I'm going to try but whenever I try to reproduce this bug in an example code, it works.

I am trying to provide a short example case that wil reproduce this error but whenever I remove the code causing the bug into an example code, the error goes away (very strange). Is there a way I can transfer the code to you without putting it on the forum?

See my next reply (which will be private)

Retired 12/31/2016

We recently purchased the new Intel Fortran composer XE 2013 and converting our old projects and getting the #6618 error for one of the projects that is being converted. I am guessing this is a compiler problem since we never had this error before. Could anyone provide guidance on this issue?

This error should not occur - can you provide us with the sources necessary to reproduce the problem? You can attach it here (a .tgz file works) or you can use Intel Premier Support (

Retired 12/31/2016

A private message with the attachment has been sent to Steve Lionel.

Pramod, I have escalated your issue to the developers.  The issue ID is DPD200242235. I sent you a workaround by email (moving a USE from inside a subroutine to the outer module level.)

Retired 12/31/2016

Pramod, the problem you encountered has been fixed for a release later this year. In your example, it can happen in some cases where a module procedure is used in specification expressions.

Retired 12/31/2016

Thanks, Steve.

Leave a Comment

Please sign in to add a comment. Not a member? Join today