Jason Merrill <ja...@redhat.com> writes:

> OK.

The testcase FAILs on Solaris with the native ld:

FAIL: g++.dg/template/ptrmem30.C  -std=c++11 (test for excess errors)
FAIL: g++.dg/template/ptrmem30.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/template/ptrmem30.C  -std=c++98 (test for excess errors)

Excess errors:
ld: warning: symbol 'read' has differing types:
        (file /var/tmp//ccXQGwka.o type=OBJT; file /lib/libc.so type=FUNC);
        /var/tmp//ccXQGwka.o definition taken

Fixed as follows.  Tested with the appropriate runtest invocation on
i386-pc-solaris2.12 and x86_64-pc-linux-gnu, installed on mainline.

        Rainer


2016-03-31  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * g++.dg/template/ptrmem30.C (read): Rename to data_read.
        (Holder::foo): Reflect this.

# HG changeset patch
# Parent  fb299874d0c97ca07d2d329ba94ff195243f2499
Fix g++.dg/template/ptrmem30.C with Solaris ld

diff --git a/gcc/testsuite/g++.dg/template/ptrmem30.C b/gcc/testsuite/g++.dg/template/ptrmem30.C
--- a/gcc/testsuite/g++.dg/template/ptrmem30.C
+++ b/gcc/testsuite/g++.dg/template/ptrmem30.C
@@ -1,11 +1,11 @@
 // PR c++/70096
 // { dg-do run }
 
-int read;
+int data_read;
 
 struct Holder
 {
-  void foo () { read = data; }
+  void foo () { data_read = data; }
   int data;
 };
 
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to