From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 739903858289; Mon, 8 Apr 2024 20:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 739903858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712608750; bh=nA/02hGA20BcZrVeiojBE74kxPiP8JTOxC6+QhfCZBY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TzrhZ1Sh1LulE2h7UfaQyTVleJG0dQ+wN52vHnnpOstoNZDaUc0xslMRXibuSltwN zskMnjr5Bh9zW4wPwEOS0QC4fNRqDVMRjbvPt/xSTVr36iqL/oIiciGEgvmlaXLJ4i Vc6BQ97JOstKij678nYFbpl1akavI+9PC2tigX50= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/114626] Very long time for compilation the attached program, depends on value of a parameter Date: Mon, 08 Apr 2024 20:39:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114626 --- Comment #3 from anlauf at gcc dot gnu.org --- Another option is to not declare max_sum as parameter but as variable. With integer :: max_sum =3D 2 * max_ij ** 3 the code compiles almost instantly, but it has noticeable runtime. (But it performs much better here than with Intel... :)=