public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/64568] [5 Regression] error: invalid reference prefix
Date: Fri, 16 Jan 2015 10:52:00 -0000	[thread overview]
Message-ID: <bug-64568-4-pgMpTSpBTC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64568-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
trippels@gcc2-power8 status % cat test22.ii
namespace std
{
typedef long unsigned size_t;
}
class H;
namespace std
{
template <typename> struct complex;
template <typename _Tp>
complex<_Tp> operator+(complex<_Tp> &__x, complex<_Tp> __y)
{
  complex<_Tp> a = __x;
  a += __y;
  return a;
}
template <> struct complex<double>
{
  int
  imag ()
  {
    return __imag__ _M_value;
  }
  void operator+=(complex __z) { _M_value += _M_value; _M_value  += __z.imag
(); }
  _Complex double _M_value;
};
}
struct A
{
  typedef std::complex<double> &const_reference;
};
class B
{
public:
  B (int);
  std::complex<double> &operator[](int i) { return data_[i]; }
  std::complex<double> *data_;
};
struct C
{
  static std::complex<double>
  apply (A::const_reference t1, std::complex<double> t2)
  {
    return t1 + t2;
  }
  typedef std::complex<double> result_type;
};
template <class T1, class> struct D
{
  static void
  apply (T1 t1, std::complex<double> t2)
  {
    t1 = t2;
  }
};
class ublas_expression
{
public:
  ~ublas_expression ();
};
template <class> class F
{
};
template <class E> class matrix_expression : ublas_expression
{
public:
  E &operator()() {}
};
class I : public F<int>
{
public:
  typedef int value_type;
  I (int);
};
template <class E1, class E2> matrix_expression<int> outer_prod (F<E1>, F<E2>);
template <class E1, class F> class J : public matrix_expression<J<E1, F> >
{
public:
  typedef typename F::result_type value_type;
  value_type operator()(int i, int)
  {
    return F::apply (e1_ (i, 0), e2_ (0, 0));
  }
  E1 e1_;
  E1 e2_;
};
template <class E1, class E2>
J<H, C> operator+(matrix_expression<E1>, matrix_expression<E2>);
template <template <class, class> class F, class M, class E>
void
indexing_matrix_assign (M m, matrix_expression<E> e, int)
{
  for (int i; i; ++i)
    F<typename M::reference, typename E::value_type>::apply (m (0, 0),
                                                             e ()(i, 0));
}
template <template <class, class> class F, class, class M, class E, class C>
void
matrix_assign (M m, matrix_expression<E> e, int, C)
{
  indexing_matrix_assign<F> (m, e, 0);
}
template <template <class, class> class F, class M, class E>
void
matrix_assign (M m, matrix_expression<E> e)
{
  matrix_assign<F, int> (m, e, 0, typename M::orientation_category ());
}
class H : matrix_expression<int>
{
public:
  typedef std::complex<double> &reference;
  typedef int orientation_category;
  H (int, int) : data_ (0) {}
  template <class AE> H (matrix_expression<AE> ae) : data_ (0)
  {
    matrix_assign<D> (*this, ae);
  }
  B &
  data ()
  {
  }
  std::complex<double> &operator()(int i, int) { return data ()[i]; }
  void operator+=(matrix_expression ae) { H (*this + ae); }
  B data_;
};
template <class M, class T, class V1, class V2>
void
sr2 (M m, T, V1 v1, V2 v2)
{
  m += outer_prod (v2, v1);
}
template <class, class, unsigned long> struct G
{
  void test ();
};
template struct G<I, H, 3>;
template <class V, class M, std::size_t N>
void
G<V, M, N>::test ()
{
  V b (0), c (0);
  M m (0, 0);
  sr2 (m, typename V::value_type (), b, c);
}

trippels@gcc2-power8 status % g++ -c -O2 -std=c++11 test22.ii
test22.ii: In member function ‘void G< <template-parameter-1-1>,
<template-parameter-1-2>, <anonymous> >::test() [with <template-parameter-1-1>
= I; <template-parameter-1-2> = H; long unsigned int <anonymous> = 3ul]’:
test22.ii:139:1: error: invalid reference prefix
 G<V, M, N>::test ()
 ^
MEM[base: _44, offset: 0]
cc1plus: note: in statement
# VUSE <.MEM_59>
_26 = IMAGPART_EXPR <MEM[base: _44, offset: 0]>;
test22.ii:139:1: error: invalid reference prefix
MEM[base: _44, offset: 0]
cc1plus: note: in statement
# VUSE <.MEM_59>
_51 = REALPART_EXPR <MEM[base: _44, offset: 0]>;
test22.ii:139:1: internal compiler error: verify_gimple failed
>From gcc-bugs-return-473483-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 16 10:55:55 2015
Return-Path: <gcc-bugs-return-473483-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24720 invoked by alias); 16 Jan 2015 10:55:55 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 24583 invoked by uid 48); 16 Jan 2015 10:55:51 -0000
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/64625] ___OFFLOAD_TABLE__ symbol not produced on x86_64 darwin
Date: Fri, 16 Jan 2015 10:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libgomp
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: openacc, openmp
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tschwinge at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords priority cc target_milestone
Message-ID: <bug-64625-4-Z4WtmrBbT8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64625-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64625-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg01477.txt.bz2
Content-length: 1317

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd625

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |openacc, openmp
           Priority|P3                          |P1
                 CC|                            |andrey.turetskiy at gmail dot com,
                   |                            |bernds at gcc dot gnu.org,
                   |                            |iverbin at gmail dot com,
                   |                            |kyukhin at gcc dot gnu.org
   Target Milestone|---                         |5.0

--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
In fact, the __OFFLOAD_TABLE__ symbol (formerly known as __OPENMP_TARGET__)
should be completely removed, as it's unused.  We settled on a different scheme
for passing this data.

We can't remove it from the libgomp OpenMP target interfaces (so, just pass
NULL for those, and remove its documentation in source code comments), because
that'd be an ABI change requiring a new symbol version, but we can remove it
from the libgomp OpenACC interfaces (ABI change still possible now, before the
5.0 release, thus setting P1).


  parent reply	other threads:[~2015-01-16 10:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12 13:40 [Bug middle-end/64568] New: " trippels at gcc dot gnu.org
2015-01-12 14:56 ` [Bug middle-end/64568] " rguenth at gcc dot gnu.org
2015-01-12 14:59 ` rguenth at gcc dot gnu.org
2015-01-12 15:26 ` trippels at gcc dot gnu.org
2015-01-13  8:32 ` rguenth at gcc dot gnu.org
2015-01-13  8:32 ` rguenth at gcc dot gnu.org
2015-01-16  9:01 ` trippels at gcc dot gnu.org
2015-01-16 10:52 ` trippels at gcc dot gnu.org [this message]
2015-01-16 13:26 ` rguenth at gcc dot gnu.org
2015-01-16 15:50 ` trippels at gcc dot gnu.org

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=bug-64568-4-pgMpTSpBTC@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).