1252190Srpaulo/* Test program for _Float16 parameters and return values. 2252190Srpaulo 3252190Srpaulo Copyright 2021-2023 Free Software Foundation, Inc. 4252190Srpaulo 5252190Srpaulo This file is part of GDB. 6252190Srpaulo 7252190Srpaulo This program is free software; you can redistribute it and/or modify 8252190Srpaulo it under the terms of the GNU General Public License as published by 9252190Srpaulo the Free Software Foundation; either version 3 of the License, or 10252190Srpaulo (at your option) any later version. 11252190Srpaulo 12252190Srpaulo This program is distributed in the hope that it will be useful, 13252190Srpaulo but WITHOUT ANY WARRANTY; without even the implied warranty of 14252190Srpaulo MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15252190Srpaulo GNU General Public License for more details. 16252190Srpaulo 17252190Srpaulo You should have received a copy of the GNU General Public License 18252190Srpaulo along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19252190Srpaulo#include <complex.h> 20252190Srpaulo 21252190Srpaulo_Float16 22252190Srpaulosquare (_Float16 num) { 23252190Srpaulo return num * num; /* BP1. */ 24252190Srpaulo} 25252190Srpaulo 26252190Srpaulo_Float16 _Complex 27252190Srpauloplus (_Float16 _Complex num) { 28252190Srpaulo return num + (2.5 + 0.5I); /* BP2. */ 29252190Srpaulo} 30252190Srpaulo 31252190Srpauloint 32252190Srpaulomain () 33252190Srpaulo{ 34252190Srpaulo _Float16 a = square (1.25); 35252190Srpaulo _Float16 _Complex b = 6.25 + I; 36252190Srpaulo _Float16 _Complex ret = plus (b); /* BP3. */ 37252190Srpaulo return 0; 38252190Srpaulo} 39252190Srpaulo