public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: gcc-patches@gcc.gnu.org, Fortran List <fortran@gcc.gnu.org>
Subject: Re: [PATCH, i386]: FIX PR50875, -O3 and -mavx lead to internal compiler error in find_reloads
Date: Thu, 27 Oct 2011 17:27:00 -0000	[thread overview]
Message-ID: <20111027164517.GA55978@troutmask.apl.washington.edu> (raw)
In-Reply-To: <CAFULd4aBApo7e7QpvqhA8GX0vWpVqeVBF10PAGB+sw0hDUBN=A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

On Thu, Oct 27, 2011 at 06:06:09PM +0200, Uros Bizjak wrote:
> 
> I would kindly ask someone fluent in fortran to construct a
> compile-time testcase from the PR [1], that will correctly exercise
> the fix on x86 with "-O3 -mavx" options and immortalize the testcase
> in gfortran testsuite.
> 

How's the attached?  I don't know if the target part of
the dg-options is required.

-- 
Steve

[-- Attachment #2: pr50875.f90 --]
[-- Type: text/plain, Size: 781 bytes --]

! { dg-do compile }
! { dg-options "-O3 -mavx" { target { i?86-*-* x86_64-*-* } }
!
! PR fortran/50875.f90
!
module test

  implicit none

  integer, parameter :: dp=kind(1.d0)

  integer :: P = 2

  real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:)
  complex(kind=dp), allocatable :: cmplx_array_A(:) 

contains

  subroutine routine_A

    integer :: i

    allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P))

    real_array_A = 1
    real_array_B = 1

    do i = 1, p
       cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp)
       cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1))
    end do

    deallocate(cmplx_array_A,real_array_B,real_array_A)

  end subroutine routine_A

end module test
! { dg-final { cleanup-modules "test" } }

  reply	other threads:[~2011-10-27 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27 16:45 Uros Bizjak
2011-10-27 17:27 ` Steve Kargl [this message]
2011-10-27 17:47   ` Uros Bizjak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111027164517.GA55978@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ubizjak@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).